Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Nov 17, 2021
1 parent df61a96 commit 5844955
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void testJobSucceed() {
Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
.onJobStateChanged(Mockito.eq(jobState2));

future.getNow(null);
future.cancel(true);
}

@Test
Expand Down Expand Up @@ -154,7 +154,7 @@ public void testJobInternalSucceed() {
Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
.onJobStateChanged(Mockito.eq(jobState2));

future.getNow(null);
future.cancel(true);
}

@Test
Expand Down Expand Up @@ -192,7 +192,7 @@ public void testJobFailed() {
String diagnostics = this.driver.diagnostics(jobId, params);
Assert.assertContains("No such file or directory", diagnostics);

future.getNow(null);
future.cancel(true);
}

@Test
Expand All @@ -216,7 +216,7 @@ public void testUnSchedulable() {
String diagnostics = this.driver.diagnostics(jobId, params);
Assert.assertContains("Unschedulable", diagnostics);

future.getNow(null);
future.cancel(true);
}

@Test
Expand Down Expand Up @@ -251,7 +251,7 @@ public void testJobCancelled() {
Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
.onJobStateChanged(Mockito.eq(jobState2));

future.getNow(null);
future.cancel(true);
}

@Test
Expand Down Expand Up @@ -291,7 +291,7 @@ public void testTwiceCreate() {

UnitTestBase.sleep(1000L);

future.getNow(null);
future.cancel(true);
}

@Test
Expand All @@ -314,7 +314,7 @@ public void testPullImageError() {
String diagnostics = this.driver.diagnostics(jobId, params);
Assert.assertContains("ImagePullBackOff", diagnostics);

future.getNow(null);
future.cancel(true);
}

@Test
Expand Down Expand Up @@ -348,6 +348,6 @@ public void testGetResourceListWithLabels() {
new HashMap<String, String>());
Assert.assertNotEquals(0, pods.size());

future.getNow(null);
future.cancel(true);
}
}

0 comments on commit 5844955

Please sign in to comment.