You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/06/17 06:11:09 UTC

[shardingsphere] branch master updated: Fix sonar issue. (#26394)

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 00ac127b858 Fix sonar issue. (#26394)
00ac127b858 is described below

commit 00ac127b858bca7cc083d10e4e7db626e1685c47
Author: Raigor <ra...@gmail.com>
AuthorDate: Sat Jun 17 14:11:02 2023 +0800

    Fix sonar issue. (#26394)
---
 .../proxy/backend/connector/jdbc/connection/ResourceLockTest.java   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/connection/ResourceLockTest.java b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/connection/ResourceLockTest.java
index 33e10b2e8b1..7d3ac071914 100644
--- a/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/connection/ResourceLockTest.java
+++ b/proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/connection/ResourceLockTest.java
@@ -21,7 +21,6 @@ import io.netty.channel.Channel;
 import io.netty.channel.ChannelHandlerContext;
 import org.apache.shardingsphere.test.mock.AutoMockExtension;
 import org.awaitility.Awaitility;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
@@ -35,9 +34,9 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
 
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.times;
 
 @ExtendWith(AutoMockExtension.class)
 @MockitoSettings(strictness = Strictness.LENIENT)
@@ -64,7 +63,6 @@ class ResourceLockTest {
         verify(resourceLock, times(1)).doAwait(channelHandlerContext);
     }
     
-    @Disabled
     @Test
     void assertDoNotify() {
         when(channel.isWritable()).thenReturn(true);
@@ -77,6 +75,6 @@ class ResourceLockTest {
             resourceLock.doNotify();
         });
         resourceLock.doAwait(channelHandlerContext);
-        assertTrue(System.currentTimeMillis() > startTime);
+        assertTrue(System.currentTimeMillis() >= startTime);
     }
 }