File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
container_registry/container_analysis/snippets Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ def test_pubsub(self):
187
187
# clean up
188
188
client .delete_subscription ({"subscription" : subscription_name })
189
189
190
- def test_poll_discovery_occurrence (self ):
190
+ def test_poll_discovery_occurrence_fails (self ):
191
191
# try with no discovery occurrence
192
192
try :
193
193
samples .poll_discovery_finished (self .image_url , 5 , PROJECT_ID )
@@ -197,6 +197,8 @@ def test_poll_discovery_occurrence(self):
197
197
# we expect timeout error
198
198
assert False
199
199
200
+ @pytest .mark .flaky (max_runs = 3 , min_passes = 1 )
201
+ def test_poll_discovery_occurrence (self ):
200
202
# create discovery occurrence
201
203
note_id = 'discovery-note-{}' .format (uuid .uuid4 ())
202
204
client = containeranalysis_v1 .ContainerAnalysisClient ()
@@ -220,7 +222,6 @@ def test_poll_discovery_occurrence(self):
220
222
create_occurrence (parent = f"projects/{ PROJECT_ID } " ,
221
223
occurrence = occurrence )
222
224
223
- # poll again
224
225
disc = samples .poll_discovery_finished (self .image_url , 10 , PROJECT_ID )
225
226
status = disc .discovery .analysis_status
226
227
assert disc is not None
You can’t perform that action at this time.
0 commit comments