Fix test for #8887

Don't demand at EOF
This commit is contained in:
Greg Wilkins 2022-11-12 08:46:09 +11:00
parent 681e04d68a
commit a812b86663
1 changed files with 2 additions and 3 deletions

View File

@ -42,7 +42,6 @@ import org.eclipse.jetty.util.FuturePromise;
import org.eclipse.jetty.util.Promise;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.slf4j.LoggerFactory;
@ -153,7 +152,6 @@ public class ReverseProxyTest
}
@Test
@Disabled // TODO this test can hang as onDataAvailable is called from the producer thread!
public void testServerBigDownloadSlowClient() throws Exception
{
CountDownLatch serverLatch = new CountDownLatch(1);
@ -188,9 +186,10 @@ public class ReverseProxyTest
TimeUnit.MILLISECONDS.sleep(1);
Stream.Data data = stream.readData();
data.release();
stream.demand();
if (data.frame().isEndStream())
clientLatch.countDown();
else
stream.demand();
}
catch (InterruptedException x)
{