Skip to content

Commit

Permalink
enable tests and more (#21596)
Browse files Browse the repository at this point in the history
  • Loading branch information
maririos authored Jun 4, 2021
1 parent f581362 commit b3f9203
Show file tree
Hide file tree
Showing 9 changed files with 1,620 additions and 393 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Azure.AI.Translation.Document.Tests
{
public abstract class DocumentTranslationLiveTestBase : RecordedTestBase<DocumentTranslationTestEnvironment>
{
protected TimeSpan PollingInterval => TimeSpan.FromSeconds(Mode == RecordedTestMode.Playback ? 0 : 30);
protected TimeSpan PollingInterval => TimeSpan.FromSeconds(Mode == RecordedTestMode.Playback ? 0 : 5);

public DocumentTranslationLiveTestBase(bool isAsync, RecordedTestMode? mode = null)
: base(isAsync, mode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public DocumentTranslationTestEnvironment()

protected override async ValueTask<bool> IsEnvironmentReadyAsync()
{
string endpoint = Environment.GetEnvironmentVariable(EndpointEnvironmentVariableName);
string endpoint = GetVariable(EndpointEnvironmentVariableName);
var client = new DocumentTranslationClient(new Uri(endpoint), Credential);
try
{
await client.GetDocumentFormatsAsync();
await client.GetAllTranslationStatusesAsync().ToEnumerableAsync();
}
catch (RequestFailedException e) when (e.Status == 401)
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b3f9203

Please sign in to comment.