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 <[email protected]>
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());
+    }
 }

Reply via email to