File tree 2 files changed +11
-2
lines changed
servicetalk-http-netty/src/test/java/io/servicetalk/http/netty
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 40
40
import org .junit .jupiter .params .ParameterizedTest ;
41
41
import org .junit .jupiter .params .provider .Arguments ;
42
42
import org .junit .jupiter .params .provider .MethodSource ;
43
+ import org .slf4j .Logger ;
44
+ import org .slf4j .LoggerFactory ;
43
45
44
46
import java .nio .channels .ClosedChannelException ;
45
47
import java .util .ArrayList ;
88
90
import static org .junit .jupiter .api .Assumptions .assumeTrue ;
89
91
90
92
final class ConnectionCloseHeaderHandlingTest {
93
+ private static final Logger LOGGER = LoggerFactory .getLogger (ConnectionCloseHeaderHandlingTest .class );
91
94
private static final Collection <Boolean > TRUE_FALSE = asList (true , false );
92
95
private static final String SERVER_SHOULD_CLOSE = "serverShouldClose" ;
93
96
@@ -175,7 +178,10 @@ public Completable accept(final ConnectionContext context) {
175
178
assert chunk != null ;
176
179
requestPayloadSize .addAndGet (chunk .readableBytes ());
177
180
}
178
- }).beforeOnError (cause -> PayloadWriterUtils .safeClose (writer , cause ))
181
+ }).beforeOnError (cause -> {
182
+ LOGGER .error ("failure while writing response" , cause );
183
+ PayloadWriterUtils .safeClose (writer , cause );
184
+ })
179
185
.afterFinally (requestPayloadReceived ::countDown )
180
186
.toFuture ();
181
187
if (awaitRequestPayload ) {
Original file line number Diff line number Diff line change 50
50
import org .junit .jupiter .params .ParameterizedTest ;
51
51
import org .junit .jupiter .params .provider .Arguments ;
52
52
import org .junit .jupiter .params .provider .MethodSource ;
53
+ import org .slf4j .Logger ;
54
+ import org .slf4j .LoggerFactory ;
53
55
54
56
import java .io .IOException ;
55
57
import java .net .SocketAddress ;
100
102
import static org .junit .jupiter .api .Assertions .assertThrows ;
101
103
102
104
class GracefulConnectionClosureHandlingTest {
103
-
105
+ private static final Logger LOGGER = LoggerFactory . getLogger ( GracefulConnectionClosureHandlingTest . class );
104
106
private static final Collection <Boolean > TRUE_FALSE = asList (true , false );
105
107
106
108
@ RegisterExtension
@@ -199,6 +201,7 @@ public Completable accept(final ConnectionContext context) {
199
201
}
200
202
serverReceivedRequestPayload .add (receivedSize );
201
203
}).beforeOnError (cause -> {
204
+ LOGGER .error ("failure while writing response" , cause );
202
205
serverReceivedRequestPayload .add (-1 );
203
206
PayloadWriterUtils .safeClose (writer , cause );
204
207
}).toFuture ();
You can’t perform that action at this time.
0 commit comments