Skip to content

label flaky httpfunction tests in thirdparty pystein http tests #1060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/unittests/test_third_party_http_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pathlib
import re
import typing
import pytest
from unittest.mock import patch

from azure_functions_worker import testutils
Expand Down Expand Up @@ -76,6 +77,7 @@ def check_log_debug_with_user_logging(self,
self.assertIn('logging debug', host_out)
self.assertIn('logging error', host_out)

@pytest.mark.flaky(reruns=3)
def test_print_logging_no_flush(self):
r = self.webhost.request('GET', 'print_logging?message=Secret42',
no_prefix=True)
Expand All @@ -85,6 +87,7 @@ def test_print_logging_no_flush(self):
def check_log_print_logging_no_flush(self, host_out: typing.List[str]):
self.assertIn('Secret42', host_out)

@pytest.mark.flaky(reruns=3)
def test_print_logging_with_flush(self):
r = self.webhost.request('GET',
'print_logging?flush=true&message'
Expand All @@ -97,6 +100,7 @@ def check_log_print_logging_with_flush(self,
host_out: typing.List[str]):
self.assertIn('Secret42', host_out)

@pytest.mark.flaky(reruns=3)
def test_print_to_console_stdout(self):
r = self.webhost.request('GET',
'print_logging?console=true&message'
Expand All @@ -105,6 +109,7 @@ def test_print_to_console_stdout(self):
self.assertEqual(r.status_code, 200)
self.assertEqual(r.text, 'OK-print-logging')

@pytest.mark.flaky(reruns=3)
def check_log_print_to_console_stdout(self,
host_out: typing.List[str]):
# System logs stdout should not exist in host_out
Expand Down Expand Up @@ -192,6 +197,7 @@ def get_script_dir(cls):
return UNIT_TESTS_ROOT / 'third_party_http_functions' / 'stein' / \
'asgi_function'

@pytest.mark.flaky(reruns=3)
def test_hijack_current_event_loop(self):
r = self.webhost.request('GET', 'hijack_current_event_loop',
no_prefix=True)
Expand Down