Skip to content

Commit

Permalink
Fix:DataSourcePoolDestroyerTest occasionally fails(#28550) (#28553)
Browse files Browse the repository at this point in the history
* Fix:DataSourcePoolDestroyerTest occasionally fails(#28550)

* fix:remove redundant import

---------

Co-authored-by: Lu <1>
  • Loading branch information
lujx98 authored Sep 24, 2023
1 parent 0d95caf commit 745d259
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
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;

Expand All @@ -43,7 +42,6 @@ void assertAsyncDestroyWithAutoCloseableDataSource() throws SQLException {
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());
Expand Down

0 comments on commit 745d259

Please sign in to comment.