Skip to content

Commit

Permalink
[Text Analytics] Diagnose issue with test resources (#13015)
Browse files Browse the repository at this point in the history
* [Text Analytics] Diagnose issue with test resources

* cancel only if not completed yet
  • Loading branch information
deyaaeldeen authored Dec 29, 2020
1 parent 6c09edd commit 5d922f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,9 @@ describe("[API Key] TextAnalyticsClient", function() {
}
}
);
await poller.cancelOperation();
if (!poller.isDone()) {
await poller.cancelOperation();
}
assert.ok(poller.getOperationState().isCancelled);
});
});
Expand Down
4 changes: 2 additions & 2 deletions sdk/textanalytics/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"cognitiveServicesEndpointSuffix": {
"type": "string",
"defaultValue": "cognitiveservices.azure.com"
"defaultValue": ".cognitiveservices.azure.com"
}
},
"variables": {
Expand Down Expand Up @@ -61,7 +61,7 @@
},
"ENDPOINT": {
"type": "string",
"value": "[concat('https://', variables('accountName'), '.', parameters('cognitiveServicesEndpointSuffix'), '/')]"
"value": "[concat('https://', variables('accountName'), parameters('cognitiveServicesEndpointSuffix'), '/')]"
}
}
}

0 comments on commit 5d922f7

Please sign in to comment.