File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
junit-jupiter/src/test/java/org/testcontainers/junit/jupiter
mariadb/src/test/java/org/testcontainers/junit/mariadb Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11package org .testcontainers .junit .jupiter ;
22
3- import org .junit .AssumptionViolatedException ;
43import org .junit .jupiter .api .MethodOrderer .OrderAnnotation ;
54import org .junit .jupiter .api .Order ;
65import org .junit .jupiter .api .Test ;
76import org .junit .jupiter .api .TestMethodOrder ;
7+ import org .opentest4j .TestAbortedException ;
88
99import static org .assertj .core .api .Assertions .assertThat ;
10- import static org .junit . Assume . assumeTrue ;
10+ import static org .assertj . core . api . Assumptions . assumeThat ;
1111
1212// The order of @ExtendsWith and @Testcontainers is crucial in order for the tests
1313@ Testcontainers
@@ -24,14 +24,14 @@ class TestLifecycleAwareExceptionCapturingTest {
2424 void failing_test_should_pass_throwable_to_testContainer () {
2525 startedTestContainer = testContainer ;
2626 // Force an exception that is captured by the test container without failing the test itself
27- assumeTrue (false );
27+ assumeThat (false ). isTrue ( );
2828 }
2929
3030 @ Test
3131 @ Order (2 )
3232 void should_have_captured_thrownException () {
3333 Throwable capturedThrowable = startedTestContainer .getCapturedThrowable ();
34- assertThat (capturedThrowable ).isInstanceOf (AssumptionViolatedException .class );
35- assertThat (capturedThrowable .getMessage ()).isEqualTo ( "got: <false>, expected: is < true> " );
34+ assertThat (capturedThrowable ).isInstanceOf (TestAbortedException .class );
35+ assertThat (capturedThrowable .getMessage ()).contains ( "Expecting value to be true but was false " );
3636 }
3737}
Original file line number Diff line number Diff line change 1919
2020import static org .assertj .core .api .Assertions .assertThat ;
2121import static org .assertj .core .api .Assumptions .assumeThat ;
22- import static org .junit .Assume .assumeFalse ;
2322
2423class SimpleMariaDBTest extends AbstractContainerDatabaseTest {
2524
@@ -58,7 +57,7 @@ void testSpecificVersion() throws SQLException {
5857
5958 @ Test
6059 void testMariaDBWithCustomIniFile () throws SQLException {
61- assumeFalse (SystemUtils .IS_OS_WINDOWS );
60+ assumeThat (SystemUtils .IS_OS_WINDOWS ). isFalse ( );
6261
6362 try (
6463 MariaDBContainer <?> mariadbCustomConfig = new MariaDBContainer <>(
You can’t perform that action at this time.
0 commit comments