Skip to content

Commit

Permalink
Fix UT
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chu <[email protected]>
  • Loading branch information
noCharger committed Jul 24, 2024
1 parent 81c4c93 commit c59f70b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void testUnscheduleJob() throws IOException {
public void testUnscheduleJobWithIndexNotFound() {
when(clusterService.state().routingTable().hasIndex(SCHEDULER_INDEX_NAME)).thenReturn(false);

assertThrows(IllegalArgumentException.class, () -> scheduler.unscheduleJob(TEST_JOB_ID));
assertThrows(IllegalStateException.class, () -> scheduler.unscheduleJob(TEST_JOB_ID));
}

@Test
Expand Down Expand Up @@ -237,7 +237,7 @@ public void testUpdateJobWithIndexNotFound() {

when(clusterService.state().routingTable().hasIndex(SCHEDULER_INDEX_NAME)).thenReturn(false);

assertThrows(IllegalArgumentException.class, () -> scheduler.updateJob(request));
assertThrows(IllegalStateException.class, () -> scheduler.updateJob(request));
}

@Test
Expand Down Expand Up @@ -305,7 +305,7 @@ public void testRemoveJob() {
public void testRemoveJobWithIndexNotFound() {
when(clusterService.state().routingTable().hasIndex(SCHEDULER_INDEX_NAME)).thenReturn(false);

assertThrows(IllegalArgumentException.class, () -> scheduler.removeJob(TEST_JOB_ID));
assertThrows(IllegalStateException.class, () -> scheduler.removeJob(TEST_JOB_ID));
}

@Test
Expand Down

0 comments on commit c59f70b

Please sign in to comment.