File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
sdk/search/azure-search-documents/src/test/java/com/azure/search/documents Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 77import com .azure .core .exception .HttpResponseException ;
88import com .azure .core .http .policy .ExponentialBackoffOptions ;
99import com .azure .core .http .policy .FixedDelay ;
10+ import com .azure .core .http .policy .FixedDelayOptions ;
1011import com .azure .core .http .policy .HttpLogOptions ;
1112import com .azure .core .http .policy .RetryOptions ;
1213import com .azure .core .http .policy .RetryPolicy ;
@@ -135,6 +136,7 @@ public void indexClientFreshDateOnRetry() throws MalformedURLException {
135136 .endpoint (searchEndpoint )
136137 .credential (searchApiKeyCredential )
137138 .indexName ("test_builder" )
139+ .retryOptions (new RetryOptions (new FixedDelayOptions (3 , Duration .ofSeconds (1 ))))
138140 .httpClient (new SearchIndexClientBuilderTests .FreshDateTestClient ())
139141 .buildAsyncClient ();
140142
Original file line number Diff line number Diff line change 1111import com .azure .core .http .HttpResponse ;
1212import com .azure .core .http .policy .ExponentialBackoffOptions ;
1313import com .azure .core .http .policy .FixedDelay ;
14+ import com .azure .core .http .policy .FixedDelayOptions ;
1415import com .azure .core .http .policy .HttpLogOptions ;
1516import com .azure .core .http .policy .RetryOptions ;
1617import com .azure .core .http .policy .RetryPolicy ;
@@ -124,6 +125,7 @@ public void serviceClientFreshDateOnRetry() throws MalformedURLException {
124125 SearchIndexAsyncClient searchIndexAsyncClient = new SearchIndexClientBuilder ()
125126 .endpoint (searchEndpoint )
126127 .credential (searchApiKeyCredential )
128+ .retryOptions (new RetryOptions (new FixedDelayOptions (3 , Duration .ofSeconds (1 ))))
127129 .httpClient (new FreshDateTestClient ())
128130 .buildAsyncClient ();
129131
Original file line number Diff line number Diff line change 1111import com .azure .core .http .HttpResponse ;
1212import com .azure .core .http .policy .ExponentialBackoffOptions ;
1313import com .azure .core .http .policy .FixedDelay ;
14+ import com .azure .core .http .policy .FixedDelayOptions ;
1415import com .azure .core .http .policy .HttpLogOptions ;
1516import com .azure .core .http .policy .RetryOptions ;
1617import com .azure .core .http .policy .RetryPolicy ;
@@ -124,6 +125,7 @@ public void serviceClientFreshDateOnRetry() throws MalformedURLException {
124125 SearchIndexerAsyncClient searchIndexerAsyncClient = new SearchIndexerClientBuilder ()
125126 .endpoint (searchEndpoint )
126127 .credential (searchApiKeyCredential )
128+ .retryOptions (new RetryOptions (new FixedDelayOptions (3 , Duration .ofSeconds (1 ))))
127129 .httpClient (new FreshDateTestClient ())
128130 .buildAsyncClient ();
129131
You can’t perform that action at this time.
0 commit comments