From 7dbd497ea98eb6f80de2b8b7c19ee1affc62257d Mon Sep 17 00:00:00 2001 From: "Alvaro.Nogueira" Date: Fri, 13 Oct 2023 12:29:16 +0200 Subject: [PATCH] #28543 Add unit test for GovernanceRepositoryAPIImpl.isExisted --- .../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 9339b4ab88fc5..2b28e2d95c54c 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 @@ private static void watch() { }); } + @Test + void assertIsExisted() { + String testKey = "/testKey1"; + assertFalse(governanceRepositoryAPI.isExisted(testKey)); + governanceRepositoryAPI.persist(testKey, "testValue1"); + assertTrue(governanceRepositoryAPI.isExisted(testKey)); + } + @Test void assertPersistJobItemProgress() { MigrationJobItemContext jobItemContext = mockJobItemContext();