diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2018-04-13 13:04:13 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2018-04-13 13:05:42 +0200 |
commit | 6b2902cb717e53bb040e105993a0043e25359725 (patch) | |
tree | ecaf0cac814b094c0a1e7bf8aa8a68a65f570f25 /jdisc_http_service | |
parent | 959b17059cbf4ce628cd4281f46b9583f0c06f72 (diff) |
Stabilize unit test
Close server before verifying that request log was invoked by Jetty
Diffstat (limited to 'jdisc_http_service')
-rw-r--r-- | jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java index 824511af79f..7c79897ac27 100644 --- a/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java +++ b/jdisc_http_service/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java @@ -132,10 +132,11 @@ public class HttpServerTest { binder -> binder.bind(AccessLog.class).toInstance(accessLogMock)); driver.client().get("/status.html") .expectStatusCode(is(REQUEST_URI_TOO_LONG)); + assertThat(driver.close(), is(true)); + assertThat(accessLogMock.logEntries.size(), equalTo(1)); AccessLogEntry accessLogEntry = accessLogMock.logEntries.get(0); assertThat(accessLogEntry.getStatusCode(), equalTo(414)); - assertThat(driver.close(), is(true)); } private static class AccessLogMock extends AccessLog { |