You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by yx...@apache.org on 2022/05/15 01:30:14 UTC

[shardingsphere] branch master updated: Add unit test for ComputeNode.getProcessTriggerInstanceIdNodePath (#17657)

This is an automated email from the ASF dual-hosted git repository.

yx9o 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 9c8a25dd6ec Add unit test for ComputeNode.getProcessTriggerInstanceIdNodePath (#17657)
9c8a25dd6ec is described below

commit 9c8a25dd6ec8582b753f13679da4d113553e4f12
Author: csonezp <cs...@gmail.com>
AuthorDate: Sun May 15 09:30:02 2022 +0800

    Add unit test for ComputeNode.getProcessTriggerInstanceIdNodePath (#17657)
    
    * Add unit test for ComputeNode.getProcessTriggerInstanceIdNodePath #16926
    
    * code format
---
 .../mode/metadata/persist/node/ComputeNodeTest.java               | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNodeTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNodeTest.java
index 78c31b76e6d..1d0274b5616 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNodeTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/node/ComputeNodeTest.java
@@ -41,6 +41,14 @@ public final class ComputeNodeTest {
         assertThat(ComputeNode.getOnlineInstanceNodePath("127.0.0.1@3307", InstanceType.JDBC), is("/nodes/compute_nodes/online/jdbc/127.0.0.1@3307"));
     }
     
+    @Test
+    public void assertGetProcessTriggerInstanceIdNodePath() {
+        assertThat(ComputeNode.getProcessTriggerInstanceIdNodePath("127.0.0.1@3307", InstanceType.PROXY, "foo_process_id"),
+                is("/nodes/compute_nodes/process_trigger/proxy/127.0.0.1@3307/foo_process_id"));
+        assertThat(ComputeNode.getProcessTriggerInstanceIdNodePath("127.0.0.1@3307", InstanceType.JDBC, "foo_process_id"),
+                is("/nodes/compute_nodes/process_trigger/jdbc/127.0.0.1@3307/foo_process_id"));
+    }
+    
     @Test
     public void assertGetInstanceLabelsNodePath() {
         assertThat(ComputeNode.getInstanceLabelsNodePath("127.0.0.1@3307"), is("/nodes/compute_nodes/attributes/127.0.0.1@3307/labels"));