File tree Expand file tree Collapse file tree
libs/vcs-client/src/it/java/org/rostilos/codecrow/vcsclient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ void shouldTimeoutOnSlowResponse() {
4646
4747 String url = mockServer .url ("/slow-endpoint" ).toString ();
4848 assertThatThrownBy (() -> {
49- try (okhttp3 .Response ignored = httpClient .newCall (
49+ try (okhttp3 .Response response = httpClient .newCall (
5050 new okhttp3 .Request .Builder ().url (url ).build ()).execute ()) {
51+ response .body ().string (); // Force reading body to trigger read timeout
5152 }
5253 }).isInstanceOf (SocketTimeoutException .class );
5354 }
@@ -107,7 +108,7 @@ void shouldHandle502() throws Exception {
107108 void shouldHandleConnectionClose () throws Exception {
108109 mockServer .enqueue (new MockResponse ()
109110 .setResponseCode (200 )
110- .setBody ("{" )
111+ .setBody ("x" . repeat ( 1024 * 1024 ) )
111112 .setSocketPolicy (okhttp3 .mockwebserver .SocketPolicy .DISCONNECT_DURING_RESPONSE_BODY ));
112113
113114 String url = mockServer .url ("/repos/owner/repo" ).toString ();
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <failsafe-summary xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" https://maven.apache.org/surefire/maven-surefire-plugin/xsd/failsafe-summary.xsd" result =" 254" timeout =" false" >
3+ <completed >0</completed >
4+ <errors >0</errors >
5+ <failures >0</failures >
6+ <skipped >0</skipped >
7+ <failureMessage xsi : nil =" true" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" />
8+ </failsafe-summary >
You can’t perform that action at this time.
0 commit comments