Skip to content

Commit

Permalink
Update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sandynz committed Sep 20, 2023
1 parent 3bcacc2 commit 8a6daa0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ void assertCountAndDataCheck() throws SQLException {
governanceRepositoryAPI.persist(String.format("/pipeline/jobs/%s/config", jobConfig.getJobId()), YamlEngine.marshal(jobConfigurationPOJO));
governanceRepositoryAPI.persistJobItemProgress(jobConfig.getJobId(), 0, "");
Map<String, TableDataConsistencyCheckResult> actual = new MigrationDataConsistencyChecker(jobConfig, new MigrationProcessContext(jobConfig.getJobId(), null),
createConsistencyCheckJobItemProgressContext()).check("FIXTURE", null);
createConsistencyCheckJobItemProgressContext(jobConfig.getJobId())).check("FIXTURE", null);
String checkKey = "t_order";
assertTrue(actual.get(checkKey).getCountCheckResult().isMatched());
assertThat(actual.get(checkKey).getCountCheckResult().getSourceRecordsCount(), is(actual.get(checkKey).getCountCheckResult().getTargetRecordsCount()));
assertTrue(actual.get(checkKey).getContentCheckResult().isMatched());
}

private ConsistencyCheckJobItemProgressContext createConsistencyCheckJobItemProgressContext() {
return new ConsistencyCheckJobItemProgressContext("", 0, "H2");
private ConsistencyCheckJobItemProgressContext createConsistencyCheckJobItemProgressContext(final String jobId) {
return new ConsistencyCheckJobItemProgressContext(jobId, 0, "H2");
}

private MigrationJobConfiguration createJobConfiguration() throws SQLException {
Expand Down

0 comments on commit 8a6daa0

Please sign in to comment.