File tree 1 file changed +3
-5
lines changed
monitoring/snippets/v3/alerts-client
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -123,18 +123,16 @@ def pochan():
123
123
124
124
125
125
def test_list_alert_policies (capsys , pochan ):
126
- # Query snippets.list_alert_policies() for up to 5 seconds
126
+ # Query snippets.list_alert_policies() for up to 50 seconds
127
127
# to allow the newly created policy to appear in the list.
128
128
retry = 5
129
129
while retry :
130
130
snippets .list_alert_policies (pochan .project_name )
131
131
out , _ = capsys .readouterr ()
132
- # Only check up to the first 20 characters of the display name
133
- # as long strings printed to the console are truncated.
134
- if pochan .alert_policy .display_name [0 :20 ] in out :
132
+ if pochan .alert_policy .display_name in out :
135
133
break
136
134
retry = retry - 1
137
- time .sleep (1 )
135
+ time .sleep (10 )
138
136
139
137
assert retry > 0
140
138
You can’t perform that action at this time.
0 commit comments