diff --git a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/deadlock/TransactionDeadlockTestCase.java b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/deadlock/TransactionDeadlockTestCase.java index 113ab464fcb1a..cfc376e46ddb2 100644 --- a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/deadlock/TransactionDeadlockTestCase.java +++ b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/deadlock/TransactionDeadlockTestCase.java @@ -33,7 +33,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; -import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; /** @@ -79,7 +79,7 @@ protected void executeTest(final TransactionContainerComposer containerComposer) // CHECKSTYLE:OFF } catch (final Exception ex) { // CHECKSTYLE:ON - assertThat(ex.getMessage(), is("com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction")); + assertThat(ex.getMessage(), containsString("Lock wait timeout exceeded; try restarting transaction")); } } log.info("The deadlock test case execution time is: {}", System.currentTimeMillis() - startTime);