Merged branch 'jetty-12.0.x' into 'jetty-12.1.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
commit
2e4ecdaa9c
|
@ -111,7 +111,7 @@ public class EventsHandlerTest
|
||||||
|
|
||||||
String response = connector.getResponse(rawRequest);
|
String response = connector.getResponse(rawRequest);
|
||||||
assertThat(response, containsString("HTTP/1.1 200 OK"));
|
assertThat(response, containsString("HTTP/1.1 200 OK"));
|
||||||
await().atMost(3, TimeUnit.SECONDS).until(attribute::get, is("testModifyRequestAttributes-123"));
|
await().atMost(5, TimeUnit.SECONDS).until(attribute::get, is("testModifyRequestAttributes-123"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -233,6 +233,8 @@ public class EventsHandlerTest
|
||||||
|
|
||||||
String response = connector.getResponse(rawRequest);
|
String response = connector.getResponse(rawRequest);
|
||||||
assertThat(response, containsString("HTTP/1.1 200 OK"));
|
assertThat(response, containsString("HTTP/1.1 200 OK"));
|
||||||
assertThat(events, equalTo(Arrays.asList("onBeforeHandling", "onAfterHandling", "onResponseBegin", "onComplete")));
|
await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
|
||||||
|
assertThat(events, equalTo(Arrays.asList("onBeforeHandling", "onAfterHandling", "onResponseBegin", "onComplete"))
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ public class EventsHandlerTest extends AbstractTest
|
||||||
assertThat(response.getStatus(), is(200));
|
assertThat(response.getStatus(), is(200));
|
||||||
assertThat(response.getContentAsString(), is("ABCDEF"));
|
assertThat(response.getContentAsString(), is("ABCDEF"));
|
||||||
assertThat(stringBuffer.toString(), is("ABCDEF"));
|
assertThat(stringBuffer.toString(), is("ABCDEF"));
|
||||||
assertThat(failures.size(), is(0));
|
await().atMost(5, TimeUnit.SECONDS).during(1, TimeUnit.SECONDS).until(failures::size, is(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
|
@ -394,56 +394,48 @@ public class EventsHandlerTest extends AbstractTest
|
||||||
@Override
|
@Override
|
||||||
protected void onBeforeHandling(Request request)
|
protected void onBeforeHandling(Request request)
|
||||||
{
|
{
|
||||||
// System.out.println("onBeforeHandling");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onRequestRead(Request request, Content.Chunk chunk)
|
protected void onRequestRead(Request request, Content.Chunk chunk)
|
||||||
{
|
{
|
||||||
// System.out.println("onRequestRead " + chunk);
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onAfterHandling(Request request, boolean handled, Throwable failure)
|
protected void onAfterHandling(Request request, boolean handled, Throwable failure)
|
||||||
{
|
{
|
||||||
// System.out.println("onAfterHandling");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResponseBegin(Request request, int status, HttpFields headers)
|
protected void onResponseBegin(Request request, int status, HttpFields headers)
|
||||||
{
|
{
|
||||||
// System.out.println("onResponseBegin");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResponseWrite(Request request, boolean last, ByteBuffer content)
|
protected void onResponseWrite(Request request, boolean last, ByteBuffer content)
|
||||||
{
|
{
|
||||||
// System.out.println("onResponseWrite");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResponseWriteComplete(Request request, Throwable failure)
|
protected void onResponseWriteComplete(Request request, Throwable failure)
|
||||||
{
|
{
|
||||||
// System.out.println("onResponseWriteComplete");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResponseTrailersComplete(Request request, HttpFields trailers)
|
protected void onResponseTrailersComplete(Request request, HttpFields trailers)
|
||||||
{
|
{
|
||||||
// System.out.println("onResponseTrailersComplete");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onComplete(Request request, int status, HttpFields headers, Throwable failure)
|
protected void onComplete(Request request, int status, HttpFields headers, Throwable failure)
|
||||||
{
|
{
|
||||||
// System.out.println("onComplete");
|
|
||||||
useForbiddenMethods(request, exceptions);
|
useForbiddenMethods(request, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue