File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
tests/src/test/java/com/maxio/advancedbilling Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11package com .maxio .advancedbilling ;
22
33import com .maxio .advancedbilling .authentication .BasicAuthModel ;
4+ import okhttp3 .OkHttpClient ;
45
56import java .util .ArrayList ;
67import java .util .List ;
@@ -67,7 +68,11 @@ public static String getEnvValue(String key) {
6768
6869 private static AdvancedBillingClient createClient (String subdomain , String apiKey ) {
6970 return new AdvancedBillingClient .Builder ()
70- .httpClientConfig (configBuilder -> configBuilder .timeout (45 ))
71+ .httpClientConfig (configBuilder -> configBuilder
72+ .timeout (45 )
73+ .httpClientInstance (
74+ new OkHttpClient .Builder ().retryOnConnectionFailure (true ).build ()
75+ ))
7176 .basicAuthCredentials (
7277 new BasicAuthModel .Builder (apiKey , PASSWORD )
7378 .build ())
Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ class SitesControllerTest {
2323 @ Test
2424 void shouldReadSite () throws Exception {
2525 // when
26- // bug: idle connection can be closed.
27- try {
28- Site site = sitesController .readSite ().getSite ();
29- } catch (Exception ignored ) {}
3026 Site site = sitesController .readSite ().getSite ();
3127
3228 // then
You can’t perform that action at this time.
0 commit comments