Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,11 @@ String requestWithCompression(String context, String suffix) throws IOException
return s.hasNext() ? s.next() : "";
}

@Test
public void testUnbound() throws IOException {
@Test(expected = IllegalArgumentException.class)
public void testRefuseUsingUnbound() throws IOException {
CollectorRegistry registry = new CollectorRegistry();
try {
HTTPServer s = new HTTPServer(HttpServer.create(), registry, true);
s.stop();
fail("Should refuse to use an unbound HttpServer");
} catch (IllegalArgumentException expected) {
}
HTTPServer s = new HTTPServer(HttpServer.create(), registry, true);
s.stop();
}

@Test
Expand Down