Skip to content

Commit

Permalink
Fix Mockito trying to mock IOException that isn't thrown by method (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Jun 26, 2018
1 parent 70ec917 commit 77c5526
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public void testHttpExporterShutdown() throws Exception {
final MultiHttpResource resource = mock(MultiHttpResource.class);

if (sniffer != null && rarely()) {
doThrow(randomFrom(new IOException("expected"), new RuntimeException("expected"))).when(sniffer).close();
doThrow(new RuntimeException("expected")).when(sniffer).close();
}

if (rarely()) {
Expand Down

0 comments on commit 77c5526

Please sign in to comment.