Skip to content

Commit c41bef4

Browse files
authored
signing off (#567)
Signed-off-by: Elvys Soares <[email protected]>
1 parent 01e1e9e commit c41bef4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

simpleclient_httpserver/src/test/java/io/prometheus/client/exporter/TestHTTPServer.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,11 @@ String requestWithCompression(String context, String suffix) throws IOException
6565
return s.hasNext() ? s.next() : "";
6666
}
6767

68-
@Test
69-
public void testUnbound() throws IOException {
68+
@Test(expected = IllegalArgumentException.class)
69+
public void testRefuseUsingUnbound() throws IOException {
7070
CollectorRegistry registry = new CollectorRegistry();
71-
try {
72-
HTTPServer s = new HTTPServer(HttpServer.create(), registry, true);
73-
s.stop();
74-
fail("Should refuse to use an unbound HttpServer");
75-
} catch (IllegalArgumentException expected) {
76-
}
71+
HTTPServer s = new HTTPServer(HttpServer.create(), registry, true);
72+
s.stop();
7773
}
7874

7975
@Test

0 commit comments

Comments
 (0)