File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
sdk/tables/azure-data-tables/src/test/java/com/azure/data/tables Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 88import com .azure .core .exception .HttpResponseException ;
99import com .azure .core .http .HttpPipeline ;
1010import com .azure .core .http .policy .ExponentialBackoffOptions ;
11+ import com .azure .core .http .policy .FixedDelayOptions ;
1112import com .azure .core .http .policy .HttpLogOptions ;
1213import com .azure .core .http .policy .RetryOptions ;
1314import com .azure .core .http .policy .RetryPolicy ;
2122
2223import java .net .MalformedURLException ;
2324import java .security .SecureRandom ;
25+ import java .time .Duration ;
2426import java .util .Collections ;
2527
2628import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
@@ -107,6 +109,7 @@ public void serviceClientFreshDateOnRetry() throws MalformedURLException {
107109 .connectionString (connectionString )
108110 .tableName (tableName )
109111 .httpClient (new TestUtils .FreshDateTestClient ())
112+ .retryOptions (new RetryOptions (new FixedDelayOptions (3 , Duration .ofSeconds (1 ))))
110113 .buildAsyncClient ();
111114
112115 StepVerifier .create (tableAsyncClient .getHttpPipeline ().send (
Original file line number Diff line number Diff line change 88import com .azure .core .exception .HttpResponseException ;
99import com .azure .core .http .HttpPipeline ;
1010import com .azure .core .http .policy .ExponentialBackoffOptions ;
11+ import com .azure .core .http .policy .FixedDelayOptions ;
1112import com .azure .core .http .policy .HttpLogOptions ;
1213import com .azure .core .http .policy .RetryOptions ;
1314import com .azure .core .http .policy .RetryPolicy ;
2122
2223import java .net .MalformedURLException ;
2324import java .security .SecureRandom ;
25+ import java .time .Duration ;
2426import java .util .Collections ;
2527
2628import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
@@ -102,6 +104,7 @@ public void serviceClientFreshDateOnRetry() throws MalformedURLException {
102104 TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder ()
103105 .connectionString (connectionString )
104106 .httpClient (new TestUtils .FreshDateTestClient ())
107+ .retryOptions (new RetryOptions (new FixedDelayOptions (3 , Duration .ofSeconds (1 ))))
105108 .buildAsyncClient ();
106109
107110 StepVerifier .create (tableServiceAsyncClient .getHttpPipeline ().send (
You can’t perform that action at this time.
0 commit comments