Skip to content

Commit

Permalink
hotfix: fix scheduler client tests (#2270)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens authored Mar 3, 2021
1 parent cb91ab7 commit 6f9b8ea
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void testCreateResetConnectionJob() throws IOException {
final StandardSync standardSync = mock(StandardSync.class);
final String destinationDockerImage = "airbyte/spaceport";
when(jobCreator.createResetConnectionJob(destination, standardSync, destinationDockerImage)).thenReturn(Optional.of(JOB_ID));
doReturn(job).when(client).waitUntilJobIsTerminalOrTimeout(JOB_ID);
when(jobPersistence.getJob(JOB_ID)).thenReturn(job);

assertEquals(job, client.createOrGetActiveResetConnectionJob(destination, standardSync, destinationDockerImage));
}
Expand All @@ -151,8 +151,7 @@ void testCreateResetConnectionJobAlreadyExist() throws IOException {
final Job currentJob = mock(Job.class);
when(currentJob.getId()).thenReturn(42L);
when(jobPersistence.getLastReplicationJob(connectionUuid)).thenReturn(Optional.of(currentJob));

doReturn(currentJob).when(client).waitUntilJobIsTerminalOrTimeout(42L);
when(jobPersistence.getJob(42L)).thenReturn(currentJob);

assertEquals(currentJob, client.createOrGetActiveResetConnectionJob(destination, standardSync, destinationDockerImage));
}
Expand Down

0 comments on commit 6f9b8ea

Please sign in to comment.