Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2023-12-12 20:21:12 +01:00
commit 8a12ed57df
No known key found for this signature in database
GPG Key ID: 1677D141BCF3584D
1 changed files with 13 additions and 5 deletions

View File

@ -247,14 +247,20 @@ public class HttpReceiverOverHTTPTest
{ {
return new HttpReceiverOverHTTP(this) return new HttpReceiverOverHTTP(this)
{ {
private boolean once = true;
@Override @Override
protected void fillInterested() protected void fillInterested()
{ {
// Verify that the buffer has been released if (once)
// before fillInterested() is called. {
assertNull(getResponseBuffer()); once = false;
// Fill the endpoint so receive is called again. // Verify that the buffer has been released
endPoint.addInput("X"); // before fillInterested() is called.
assertNull(getResponseBuffer());
// Fill the endpoint so receive is called again.
endPoint.addInput("X");
}
super.fillInterested(); super.fillInterested();
} }
}; };
@ -277,5 +283,7 @@ public class HttpReceiverOverHTTPTest
Response response = completable.get(5, TimeUnit.SECONDS); Response response = completable.get(5, TimeUnit.SECONDS);
assertNotNull(response); assertNotNull(response);
assertEquals(200, response.getStatus()); assertEquals(200, response.getStatus());
Thread.sleep(2000);
} }
} }