5
5
import pathlib
6
6
import re
7
7
import typing
8
+ import pytest
8
9
from unittest .mock import patch
9
10
10
11
from azure_functions_worker import testutils
@@ -76,6 +77,7 @@ def check_log_debug_with_user_logging(self,
76
77
self .assertIn ('logging debug' , host_out )
77
78
self .assertIn ('logging error' , host_out )
78
79
80
+ @pytest .mark .flaky (reruns = 3 )
79
81
def test_print_logging_no_flush (self ):
80
82
r = self .webhost .request ('GET' , 'print_logging?message=Secret42' ,
81
83
no_prefix = True )
@@ -85,6 +87,7 @@ def test_print_logging_no_flush(self):
85
87
def check_log_print_logging_no_flush (self , host_out : typing .List [str ]):
86
88
self .assertIn ('Secret42' , host_out )
87
89
90
+ @pytest .mark .flaky (reruns = 3 )
88
91
def test_print_logging_with_flush (self ):
89
92
r = self .webhost .request ('GET' ,
90
93
'print_logging?flush=true&message'
@@ -97,6 +100,7 @@ def check_log_print_logging_with_flush(self,
97
100
host_out : typing .List [str ]):
98
101
self .assertIn ('Secret42' , host_out )
99
102
103
+ @pytest .mark .flaky (reruns = 3 )
100
104
def test_print_to_console_stdout (self ):
101
105
r = self .webhost .request ('GET' ,
102
106
'print_logging?console=true&message'
@@ -105,6 +109,7 @@ def test_print_to_console_stdout(self):
105
109
self .assertEqual (r .status_code , 200 )
106
110
self .assertEqual (r .text , 'OK-print-logging' )
107
111
112
+ @pytest .mark .flaky (reruns = 3 )
108
113
def check_log_print_to_console_stdout (self ,
109
114
host_out : typing .List [str ]):
110
115
# System logs stdout should not exist in host_out
@@ -192,6 +197,7 @@ def get_script_dir(cls):
192
197
return UNIT_TESTS_ROOT / 'third_party_http_functions' / 'stein' / \
193
198
'asgi_function'
194
199
200
+ @pytest .mark .flaky (reruns = 3 )
195
201
def test_hijack_current_event_loop (self ):
196
202
r = self .webhost .request ('GET' , 'hijack_current_event_loop' ,
197
203
no_prefix = True )
0 commit comments