Skip to content

Commit 5d922f7

Browse files
authored
[Text Analytics] Diagnose issue with test resources (Azure#13015)
* [Text Analytics] Diagnose issue with test resources * cancel only if not completed yet
1 parent 6c09edd commit 5d922f7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sdk/textanalytics/ai-text-analytics/test/public/apiKey.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ describe("[API Key] TextAnalyticsClient", function() {
599599
}
600600
}
601601
);
602-
await poller.cancelOperation();
602+
if (!poller.isDone()) {
603+
await poller.cancelOperation();
604+
}
603605
assert.ok(poller.getOperationState().isCancelled);
604606
});
605607
});

sdk/textanalytics/test-resources.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"cognitiveServicesEndpointSuffix": {
1919
"type": "string",
20-
"defaultValue": "cognitiveservices.azure.com"
20+
"defaultValue": ".cognitiveservices.azure.com"
2121
}
2222
},
2323
"variables": {
@@ -61,7 +61,7 @@
6161
},
6262
"ENDPOINT": {
6363
"type": "string",
64-
"value": "[concat('https://', variables('accountName'), '.', parameters('cognitiveServicesEndpointSuffix'), '/')]"
64+
"value": "[concat('https://', variables('accountName'), parameters('cognitiveServicesEndpointSuffix'), '/')]"
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)