8174833: java/net/httpclient/http2/BasicTest.java always fails but always report success
Reviewed-by: michaelm
This commit is contained in:
parent
9d5439dda1
commit
28fc67ce7e
@ -94,6 +94,7 @@ public class BasicTest {
|
||||
} catch (Throwable tt) {
|
||||
System.err.println("tt caught");
|
||||
tt.printStackTrace();
|
||||
throw tt;
|
||||
} finally {
|
||||
httpServer.stop();
|
||||
httpsServer.stop();
|
||||
@ -223,7 +224,7 @@ public class BasicTest {
|
||||
CompletableFuture[] responses = new CompletableFuture[LOOPS];
|
||||
final Path source = TestUtil.getAFile(FILESIZE);
|
||||
HttpRequest request = HttpRequest.newBuilder(uri)
|
||||
.POST(fromFile(tempFile()))
|
||||
.POST(fromFile(source))
|
||||
.build();
|
||||
for (int i = 0; i < LOOPS; i++) {
|
||||
responses[i] = client.sendAsync(request, asFile(tempFile()))
|
||||
|
@ -392,9 +392,11 @@ public class Http2TestServerConnection {
|
||||
//System.err.println ("Stream window size = " + winsize);
|
||||
|
||||
final InputStream bis;
|
||||
if (endStreamReceived) {
|
||||
if (endStreamReceived && queue.size() == 0) {
|
||||
System.err.println("Server: got END_STREAM for stream " + streamid);
|
||||
bis = NullInputStream.INSTANCE;
|
||||
} else {
|
||||
System.err.println("Server: creating input stream for stream " + streamid);
|
||||
bis = new BodyInputStream(queue, streamid, this);
|
||||
}
|
||||
try (bis;
|
||||
|
Loading…
x
Reference in New Issue
Block a user