Skip to content

Commit

Permalink
Update test for review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
doyleyoung authored and rohanKanojia committed Mar 8, 2021
1 parent 2a43f2d commit b2f287d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import mockit.Mocked;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

Expand Down Expand Up @@ -303,12 +304,8 @@ public void testWithMultipleStopExceptions() throws Exception {

runService = new RunService(docker, queryService, tracker, logOutputSpecFactory, log);

try {
runService.stopStartedContainers(false, true, true, testLabel);
fail("Should have thrown exception");
} catch (DockerAccessException | ExecException e) {
assertEquals(e.getLocalizedMessage(), "(TEST two,TEST one)");
}
Exception thrownException = assertThrows(DockerAccessException.class, () -> runService.stopStartedContainers(false, true, true, testLabel));
assertEquals("(TEST two,TEST one)", thrownException.getLocalizedMessage());
}

@Test
Expand Down

0 comments on commit b2f287d

Please sign in to comment.