Commit 066aeeb 1 parent 0f04ce6 commit 066aeeb Copy full SHA for 066aeeb
File tree 2 files changed +12
-3
lines changed
src/test/java/com/microsoft/sqlserver/jdbc
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,15 @@ public static boolean isAzureMI(Connection con) {
237
237
return ((SQLServerConnection ) con ).isAzureMI ();
238
238
}
239
239
240
+ /**
241
+ * Checks if connection is established to Azure Synapse OnDemand server
242
+ *
243
+ */
244
+ public static boolean isAzureSynapseOnDemand (Connection con ) {
245
+ isAzure (con );
246
+ return ((SQLServerConnection ) con ).isAzureSynapseOnDemandEndpoint ();
247
+ }
248
+
240
249
/**
241
250
* Checks if connection is established to server that supports AEv2.
242
251
*
Original file line number Diff line number Diff line change @@ -266,12 +266,12 @@ public void testAzureEndpointRetry() {
266
266
try (Connection con = PrepUtil .getConnection (connectionString )) {
267
267
Field fields [] = con .getClass ().getSuperclass ().getDeclaredFields ();
268
268
for (Field f : fields ) {
269
- if (f .getName () == "connectRetryCount" ) {
269
+ if (f .getName (). equals ( "connectRetryCount" ) ) {
270
270
f .setAccessible (true );
271
271
int retryCount = f .getInt (con );
272
272
273
- if (TestUtils .isAzureDW (con )) {
274
- assertTrue (retryCount == 5 ); // AZURE_SYNAPSE_ONDEMAND_ENDPOINT_RETRY_COUNT_DEFAFULT
273
+ if (TestUtils .isAzureSynapseOnDemand (con )) {
274
+ assertTrue (retryCount == 5 ); // AZURE_SYNAPSE_ONDEMAND_ENDPOINT_RETRY_COUNT_DEFAULT
275
275
} else if (TestUtils .isAzure (con )) {
276
276
assertTrue (retryCount == 2 ); // AZURE_SERVER_ENDPOINT_RETRY_COUNT_DEFAFULT
277
277
} else {
You can’t perform that action at this time.
0 commit comments