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 authored Jun 22, 2018
1 parent 16e4e7a commit 3c42bfa
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ public void testHttpExporter() throws Exception {
}
}

@AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/31433" )
public void testHttpExporterShutdown() throws Exception {
final Config config = createConfig(Settings.EMPTY);
final RestClient client = mock(RestClient.class);
Expand All @@ -469,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 3c42bfa

Please sign in to comment.