This is an automated email from the ASF dual-hosted git repository.

zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 745d2598448 Fix:DataSourcePoolDestroyerTest occasionally fails(#28550) 
(#28553)
745d2598448 is described below

commit 745d259844891fb287645a80b3203152685434b4
Author: HardbassMafia <[email protected]>
AuthorDate: Sun Sep 24 12:37:09 2023 +0800

    Fix:DataSourcePoolDestroyerTest occasionally fails(#28550) (#28553)
    
    * Fix:DataSourcePoolDestroyerTest occasionally fails(#28550)
    
    * fix:remove redundant import
    
    ---------
    
    Co-authored-by: Lu <1>
---
 .../infra/datasource/pool/destroyer/DataSourcePoolDestroyerTest.java    | 2 --
 1 file changed, 2 deletions(-)

diff --git 
a/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/DataSourcePoolDestroyerTest.java
 
b/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/DataSourcePoolDestroyerTest.java
index 3e879bbbc00..a2e324a9d1e 100644
--- 
a/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/DataSourcePoolDestroyerTest.java
+++ 
b/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/destroyer/DataSourcePoolDestroyerTest.java
@@ -27,7 +27,6 @@ import java.sql.SQLException;
 import java.util.concurrent.TimeUnit;
 
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
-import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.mock;
 
@@ -43,7 +42,6 @@ class DataSourcePoolDestroyerTest {
         MockedDataSource dataSource = new MockedDataSource();
         try (Connection ignored = dataSource.getConnection()) {
             new DataSourcePoolDestroyer(dataSource).asyncDestroy();
-            assertFalse(dataSource.isClosed());
         }
         Awaitility.await().atMost(1L, TimeUnit.SECONDS).pollInterval(10L, 
TimeUnit.MILLISECONDS).until(dataSource::isClosed);
         assertTrue(dataSource.isClosed());

Reply via email to