File tree 2 files changed +12
-9
lines changed
google-http-client/src/test/java/com/google/api/client/http/javanet
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 25
25
strategy :
26
26
fail-fast : false
27
27
matrix :
28
- java : [8, 11, 17]
28
+ java : [8, 11, 17, 23 ]
29
29
steps :
30
30
- uses : actions/checkout@v4
31
31
- uses : actions/setup-java@v4
54
54
runs-on : ubuntu-latest
55
55
strategy :
56
56
matrix :
57
- java : [8, 11, 17]
57
+ java : [8, 11, 17, 23 ]
58
58
steps :
59
59
- uses : actions/checkout@v4
60
60
- uses : actions/setup-java@v4
Original file line number Diff line number Diff line change @@ -203,14 +203,17 @@ public void testDisconnectShouldNotWaitToReadResponse() throws IOException {
203
203
public void handle (HttpExchange httpExchange ) throws IOException {
204
204
byte [] response = httpExchange .getRequestURI ().toString ().getBytes ();
205
205
httpExchange .sendResponseHeaders (200 , response .length );
206
-
207
- // Sleep for longer than the test timeout
208
- try {
209
- Thread .sleep (100_000 );
210
- } catch (InterruptedException e ) {
211
- throw new IOException ("interrupted" , e );
212
- }
213
206
try (OutputStream out = httpExchange .getResponseBody ()) {
207
+ byte [] firstByte = new byte [] {0x01 };
208
+ out .write (firstByte );
209
+ out .flush ();
210
+
211
+ // Sleep for longer than the test timeout
212
+ try {
213
+ Thread .sleep (100_000 );
214
+ } catch (InterruptedException e ) {
215
+ throw new IOException ("interrupted" , e );
216
+ }
214
217
out .write (response );
215
218
}
216
219
}
You can’t perform that action at this time.
0 commit comments