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 4d26a3b036b fix unit tests (#31331)
4d26a3b036b is described below

commit 4d26a3b036b880ea5a2d904adb2346ed3bfa9b78
Author: Haoran Meng <[email protected]>
AuthorDate: Tue May 21 18:25:58 2024 +0800

    fix unit tests (#31331)
---
 .../registry/workerid/generator/ClusterWorkerIdGeneratorTest.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/generator/ClusterWorkerIdGeneratorTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/generator/ClusterWorkerIdGeneratorTest.java
index 7b74dd62b0a..a82c3e800f4 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/generator/ClusterWorkerIdGeneratorTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/workerid/generator/ClusterWorkerIdGeneratorTest.java
@@ -44,7 +44,7 @@ class ClusterWorkerIdGeneratorTest {
     @Test
     void assertGenerateWithoutExistedWorkerId() {
         ClusterPersistRepository repository = 
mock(ClusterPersistRepository.class);
-        doAnswer((Answer<Object>) invocation -> 
"foo_id").when(repository).persistEphemeral("/worker_id/0", "foo_id");
+        doAnswer((Answer<Object>) invocation -> 
Boolean.TRUE).when(repository).persistExclusiveEphemeral("/reservation/worker_id/0",
 "foo_id");
         assertThat(new ClusterWorkerIdGenerator(repository, 
"foo_id").generate(new Properties()), is(0));
     }
 }

Reply via email to