use of com.hotels.styx.testapi.StyxServer in project styx by ExpediaGroup.
the class ProtocolMetricsTest method recordsServerSideHttp.
@Test
public void recordsServerSideHttp() {
styxServer = new StyxServer.Builder().addRoute("/", origin.port()).start();
HttpResponse response = doGet("/");
assertThat(response.status(), is(OK));
assertThat(styxServer.metrics().meter("styx.server.http.requests").getCount(), is(1L));
assertThat(styxServer.metrics().meter("styx.server.https.requests").getCount(), is(0L));
assertThat(styxServer.metrics().meter("styx.server.http.responses.200").getCount(), is(1L));
assertThat(styxServer.metrics().meter("styx.server.https.responses.200").getCount(), is(0L));
}
use of com.hotels.styx.testapi.StyxServer in project styx by ExpediaGroup.
the class ProtocolMetricsTest method recordsServerSideHttps.
@Test
public void recordsServerSideHttps() {
styxServer = new StyxServer.Builder().addRoute("/", origin.port()).start();
HttpResponse response = doHttpsGet("/");
assertThat(response.status(), is(OK));
assertThat(styxServer.metrics().meter("styx.server.http.requests").getCount(), is(0L));
assertThat(styxServer.metrics().meter("styx.server.https.requests").getCount(), is(1L));
assertThat(styxServer.metrics().meter("styx.server.http.responses.200").getCount(), is(0L));
assertThat(styxServer.metrics().meter("styx.server.https.responses.200").getCount(), is(1L));
}
Aggregations