Skip to content

Commit

Permalink
use ClientDiagnostics and disable tests now that we have logs (#20047)
Browse files Browse the repository at this point in the history
  • Loading branch information
maririos authored Apr 2, 2021
1 parent 2a542fe commit f29294e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ public DocumentTranslationClient GetClient(
DocumentTranslationClientOptions options = default)
{
var endpoint = new Uri(TestEnvironment.Endpoint);
options ??= new DocumentTranslationClientOptions();
options ??= new DocumentTranslationClientOptions()
{
Diagnostics =
{
LoggedHeaderNames = { "x-ms-request-id", "X-RequestId" },
IsLoggingContentEnabled = true
}
};

credential ??= new AzureKeyCredential(TestEnvironment.ApiKey);
return InstrumentClient(new DocumentTranslationClient(endpoint, credential, InstrumentClientOptions(options)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public async Task SingleSourceSingleTargetTest()
}

[RecordedTest]
[Ignore("Flaky test. Enable once service provides fix/information")]
public async Task SingleSourceMultipleTargetsTest()
{
Uri source = await CreateSourceContainerAsync(oneTestDocuments);
Expand Down Expand Up @@ -246,6 +247,7 @@ public async Task GetDocumentStatusTest()
}

[RecordedTest]
[Ignore("Flaky test. Enable once service provides fix/information")]
public async Task WrongSourceRightTarget()
{
Uri source = new("https://idont.ex.ist");
Expand All @@ -266,6 +268,7 @@ public async Task WrongSourceRightTarget()
}

[RecordedTest]
[Ignore("Flaky test. Enable once service provides fix/information")]
public async Task RightSourceWrongTarget()
{
Uri source = await CreateSourceContainerAsync(oneTestDocuments);
Expand Down

0 comments on commit f29294e

Please sign in to comment.