This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 c2fa4152fa8 Fix test case for MigrationJobAPITest (#26860)
c2fa4152fa8 is described below
commit c2fa4152fa80eb0cf073fae650e0b23782b7dd9a
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jul 9 20:07:51 2023 +0800
Fix test case for MigrationJobAPITest (#26860)
* Refactor InventoryIncrementalJobItemProgress
* Fix test case for MigrationJobAPITest
---
.../data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
index a55a14336bb..dddfb1bb97d 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
@@ -341,6 +341,7 @@ class MigrationJobAPITest {
String jobId = optional.get();
YamlInventoryIncrementalJobItemProgress yamlJobItemProgress = new
YamlInventoryIncrementalJobItemProgress();
yamlJobItemProgress.setStatus(JobStatus.RUNNING.name());
+ yamlJobItemProgress.setSourceDatabaseType("MySQL");
PipelineAPIFactory.getGovernanceRepositoryAPI(PipelineContextUtils.getContextKey()).persistJobItemProgress(jobId,
0, YamlEngine.marshal(yamlJobItemProgress));
List<InventoryIncrementalJobItemInfo> jobItemInfos =
jobAPI.getJobItemInfos(jobId);
assertThat(jobItemInfos.size(), is(1));
@@ -354,6 +355,7 @@ class MigrationJobAPITest {
Optional<String> optional =
jobAPI.start(JobConfigurationBuilder.createJobConfiguration());
assertTrue(optional.isPresent());
YamlInventoryIncrementalJobItemProgress yamlJobItemProgress = new
YamlInventoryIncrementalJobItemProgress();
+ yamlJobItemProgress.setSourceDatabaseType("MySQL");
yamlJobItemProgress.setStatus(JobStatus.EXECUTE_INCREMENTAL_TASK.name());
yamlJobItemProgress.setProcessedRecordsCount(100);
yamlJobItemProgress.setInventoryRecordsCount(50);