Skip to content

Commit 9d9353f

Browse files
committed
Fix import
1 parent ae1557b commit 9d9353f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

modules/junit-jupiter/src/test/java/org/testcontainers/junit/jupiter/TestLifecycleAwareExceptionCapturingTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package org.testcontainers.junit.jupiter;
22

3-
import org.junit.AssumptionViolatedException;
43
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
54
import org.junit.jupiter.api.Order;
65
import org.junit.jupiter.api.Test;
76
import org.junit.jupiter.api.TestMethodOrder;
7+
import org.opentest4j.TestAbortedException;
88

99
import 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
}

modules/mariadb/src/test/java/org/testcontainers/junit/mariadb/SimpleMariaDBTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import static org.assertj.core.api.Assertions.assertThat;
2121
import static org.assertj.core.api.Assumptions.assumeThat;
22-
import static org.junit.Assume.assumeFalse;
2322

2423
class 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<>(

0 commit comments

Comments
 (0)