Skip to content

Commit

Permalink
Fix tests with new log format
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kutz authored and mkutz committed Apr 13, 2023
1 parent e826fc9 commit 8b1877c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void answersRetryableTest1() {
assertThatExceptionOfType(TimeoutException.class)
.isThrownBy(() -> actor.checks(retryableQuestion));

assertThat(called).hasValueGreaterThanOrEqualTo(10);
assertThat(called).hasValueBetween(9, 11);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void test2() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan - Logan does some task ✓"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan -- Logan does some task ✓"
+ " (\\d+s)?(<?\\d+ms)\n");
}

Expand All @@ -55,7 +55,7 @@ void test3() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan - Logan does some task ✗"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan -- Logan does some task ✗"
+ " (\\d+s)?(<?\\d+ms) RuntimeException\n");
}

Expand All @@ -72,7 +72,7 @@ void test4() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan - Logan does some retryable"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan -- Logan does some retryable"
+ " task •✗ (\\d+s)?(<?\\d+ms) RuntimeException\n");
}

Expand All @@ -99,7 +99,7 @@ void test6() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan - Logan checks some question ✓"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan -- Logan checks some question ✓"
+ " (\\d+s)?(<?\\d+ms) → answer\n");
}

Expand All @@ -115,7 +115,7 @@ void test7() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan - Logan checks some question ✗"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan -- Logan checks some question ✗"
+ " (\\d+s)?(<?\\d+ms) RuntimeException\n");
}

Expand All @@ -134,7 +134,7 @@ void test8() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan - Logan checks some retryable"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan -- Logan checks some retryable"
+ " question ••✗ (\\d+s)?(<?\\d+ms) → unaccepted answer\n");
}

Expand All @@ -153,7 +153,7 @@ void test9() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan - Logan does some root task ✓"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan -- Logan does some root task ✓"
+ " (\\d+s)?(<?\\d+ms)\n"
+ "└── Logan checks some sub question ✓ (\\d+s)?(<?\\d+ms) → answer\n");
}
Expand All @@ -173,7 +173,7 @@ void test10() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan - Logan checks some root"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan -- Logan checks some root"
+ " question ✗ (\\d+s)?(<?\\d+ms) RuntimeException\n"
+ "└── Logan does some sub task ✓ (\\d+s)?(<?\\d+ms)\n");
}
Expand Down Expand Up @@ -204,10 +204,10 @@ void test11() {

assertThat(output.getOut())
.matches(
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan - Logan does some root task ✓"
"\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] INFO Logan -- Logan does some root task ✓"
+ " (\\d+s)?(<?\\d+ms)\n"
+ "└── Logan checks first sub question ✓ (\\d+s)?(<?\\d+ms) → answer\n"
+ "\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan - Logan checks some root"
+ "\\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\[[^\\\\]+\\] WARN Logan -- Logan checks some root"
+ " question ✗ (\\d+s)?(<?\\d+ms) RuntimeException\n"
+ "├── Logan does first sub task ✓ (\\d+s)?(<?\\d+ms)\n"
+ "└── Logan does second sub task ✗ (\\d+s)?(<?\\d+ms) RuntimeException\n");
Expand Down

0 comments on commit 8b1877c

Please sign in to comment.