Commit 07268c4 1 parent bb76a78 commit 07268c4 Copy full SHA for 07268c4
File tree 1 file changed +7
-1
lines changed
src/test/java/com/microsoft/sqlserver/jdbc/connection
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 26
26
27
27
import com .microsoft .sqlserver .jdbc .RandomUtil ;
28
28
import com .microsoft .sqlserver .jdbc .SQLServerDataSource ;
29
+ import com .microsoft .sqlserver .jdbc .SQLServerDriver ;
29
30
import com .microsoft .sqlserver .jdbc .SQLServerStatement ;
30
31
import com .microsoft .sqlserver .jdbc .TestResource ;
31
32
import com .microsoft .sqlserver .jdbc .TestUtils ;
@@ -275,7 +276,12 @@ public void testAzureEndpointRetry() {
275
276
} else if (TestUtils .isAzure (con )) {
276
277
assertTrue (retryCount == 2 ); // AZURE_SERVER_ENDPOINT_RETRY_COUNT_DEFAFULT
277
278
} else {
278
- assertTrue (retryCount == 1 ); // default connectRetryCount
279
+ // default retryCount is 1 if not set in connection string
280
+ String retryCountFromConnStr = TestUtils .getProperty (connectionString , "connectRetryCount" );
281
+ int expectedRetryCount = (retryCountFromConnStr != null ) ? Integer
282
+ .parseInt (retryCountFromConnStr ) : 1 ;
283
+
284
+ assertTrue (retryCount == expectedRetryCount ); // default connectRetryCount
279
285
}
280
286
}
281
287
}
You can’t perform that action at this time.
0 commit comments