fixed race in HttpReceiverOverHTTPTest
This commit is contained in:
parent
839485797b
commit
228600caf5
|
@ -301,6 +301,9 @@ public abstract class HttpReceiver
|
|||
if (decoder != null)
|
||||
{
|
||||
buffer = decoder.decode(buffer);
|
||||
|
||||
// TODO If the decoder consumes all the content, should we return here?
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Response content decoded ({}) {}{}{}", decoder, response, System.lineSeparator(), BufferUtil.toDetailString(buffer));
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.eclipse.jetty.http.HttpHeader;
|
|||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.io.ByteArrayEndPoint;
|
||||
import org.eclipse.jetty.toolchain.test.TestTracker;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
|
@ -230,7 +231,11 @@ public class HttpReceiverOverHTTPTest
|
|||
@Override
|
||||
public void onContent(Response response, ByteBuffer content)
|
||||
{
|
||||
boolean hadRemaining=content.hasRemaining();
|
||||
super.onContent(response, content);
|
||||
|
||||
// TODO gzip decoding can pass on empty chunks. Currently ignoring them here, but could be done at the decoder???
|
||||
if (hadRemaining) // Ignore empty chunks
|
||||
latch.countDown();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue