This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 48668fc5538 Fix sonar issue on DataSourcePoolPropertiesTest (#33136)
48668fc5538 is described below
commit 48668fc5538fae93d2fa5de977a1b4e94919276f
Author: yx9o <[email protected]>
AuthorDate: Mon Oct 7 02:07:25 2024 +0800
Fix sonar issue on DataSourcePoolPropertiesTest (#33136)
---
.../datasource/pool/props/domain/DataSourcePoolPropertiesTest.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
a/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/props/domain/DataSourcePoolPropertiesTest.java
b/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/props/domain/DataSourcePoolPropertiesTest.java
index 079c6e1cf0e..d3ff90b5610 100644
---
a/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/props/domain/DataSourcePoolPropertiesTest.java
+++
b/infra/data-source-pool/core/src/test/java/org/apache/shardingsphere/infra/datasource/pool/props/domain/DataSourcePoolPropertiesTest.java
@@ -32,8 +32,8 @@ import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -100,10 +100,9 @@ class DataSourcePoolPropertiesTest {
is(new
DataSourcePoolProperties(MockedDataSource.class.getName(),
createUserProperties("root"))));
}
- @SuppressWarnings({"SimplifiableAssertion", "ConstantValue"})
@Test
void assertNotEqualsWithNullValue() {
- assertFalse(new
DataSourcePoolProperties(MockedDataSource.class.getName(),
Collections.emptyMap()).equals(null));
+ assertThat(new
DataSourcePoolProperties(MockedDataSource.class.getName(),
Collections.emptyMap()), not(nullValue()));
}
@Test