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 2022/10/03 05:18:27 UTC
[shardingsphere] branch master updated: [Issue #21016]-Improve coverage of BootstrapArguments (#21308)
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 cfe722adec5 [Issue #21016]-Improve coverage of BootstrapArguments (#21308)
cfe722adec5 is described below
commit cfe722adec5b62dd576b1eaaae87556adf1ff477
Author: Abhinav Koppula <ab...@gmail.com>
AuthorDate: Mon Oct 3 10:48:19 2022 +0530
[Issue #21016]-Improve coverage of BootstrapArguments (#21308)
---
.../shardingsphere/proxy/arguments/BootstrapArgumentsTest.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/arguments/BootstrapArgumentsTest.java b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/arguments/BootstrapArgumentsTest.java
index 80bdb84df0f..42ef462702b 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/arguments/BootstrapArgumentsTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/arguments/BootstrapArgumentsTest.java
@@ -104,4 +104,13 @@ public final class BootstrapArgumentsTest {
assertThat(new BootstrapArguments(new String[]{"3306", "test_conf", "127.0.0.1"}).getAddresses(), is(Collections.singletonList("127.0.0.1")));
assertThat(new BootstrapArguments(new String[]{"3306", "test_conf", "1.1.1.1,127.0.0.1"}).getAddresses(), is(Arrays.asList("1.1.1.1", "127.0.0.1")));
}
+
+ @Test
+ public void assertGetForce() {
+ assertFalse(new BootstrapArguments(new String[]{"3306", "test_conf", "127.0.0.1"}).getForce());
+ assertFalse(new BootstrapArguments(new String[]{"3306", "test_conf", "127.0.0.1", "false"}).getForce());
+ assertTrue(new BootstrapArguments(new String[]{"3306", "test_conf", "127.0.0.1", "true "}).getForce());
+ assertTrue(new BootstrapArguments(new String[]{"3306", "test_conf", "127.0.0.1", "true"}).getForce());
+ assertTrue(new BootstrapArguments(new String[]{"3306", "test_conf", "127.0.0.1", "TrUe"}).getForce());
+ }
}