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 ada9f9fb442 #28543 Add unit test for
GovernanceRepositoryAPIImpl.isExisted (#28755)
ada9f9fb442 is described below
commit ada9f9fb4426fdabf7c4d33c7926b2d32e47a809
Author: alvaritez <[email protected]>
AuthorDate: Sat Oct 14 13:33:11 2023 +0200
#28543 Add unit test for GovernanceRepositoryAPIImpl.isExisted (#28755)
---
.../core/job/service/GovernanceRepositoryAPIImplTest.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/service/GovernanceRepositoryAPIImplTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/service/GovernanceRepositoryAPIImplTest.java
index 9339b4ab88f..2b28e2d95c5 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/service/GovernanceRepositoryAPIImplTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/service/GovernanceRepositoryAPIImplTest.java
@@ -77,6 +77,14 @@ class GovernanceRepositoryAPIImplTest {
});
}
+ @Test
+ void assertIsExisted() {
+ String testKey = "/testKey1";
+ assertFalse(governanceRepositoryAPI.isExisted(testKey));
+ governanceRepositoryAPI.persist(testKey, "testValue1");
+ assertTrue(governanceRepositoryAPI.isExisted(testKey));
+ }
+
@Test
void assertPersistJobItemProgress() {
MigrationJobItemContext jobItemContext = mockJobItemContext();