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 ecf3fe879cd74..7806cda61dcb9 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 @@ -31,6 +31,8 @@ import org.apache.shardingsphere.data.pipeline.core.task.PipelineTaskUtils; import org.apache.shardingsphere.data.pipeline.scenario.migration.config.MigrationTaskConfiguration; import org.apache.shardingsphere.data.pipeline.scenario.migration.context.MigrationJobItemContext; +import org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO; +import org.apache.shardingsphere.infra.util.yaml.YamlEngine; import org.apache.shardingsphere.mode.event.DataChangedEvent; import org.apache.shardingsphere.mode.event.DataChangedEvent.Type; import org.apache.shardingsphere.mode.manager.ContextManager; @@ -85,10 +87,11 @@ private static void watch() { @Test void assertIsJobConfigurationExisted() { assertFalse(governanceRepositoryAPI.isJobConfigurationExisted("foo_job")); - getClusterPersistRepository().persist("/pipeline/jobs/foo_job/config", "foo"); + JobConfigurationPOJO value = new JobConfigurationPOJO(); + value.setJobName("foo_job"); + value.setShardingTotalCount(1); + getClusterPersistRepository().persist("/pipeline/jobs/foo_job/config", YamlEngine.marshal(value)); assertTrue(governanceRepositoryAPI.isJobConfigurationExisted("foo_job")); - getClusterPersistRepository().delete("/pipeline/jobs/foo_job/config"); - assertFalse(governanceRepositoryAPI.isJobConfigurationExisted("foo_job")); } @Test