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):
187187 # clean up
188188 client .delete_subscription ({"subscription" : subscription_name })
189189
190- def test_poll_discovery_occurrence (self ):
190+ def test_poll_discovery_occurrence_fails (self ):
191191 # try with no discovery occurrence
192192 try :
193193 samples .poll_discovery_finished (self .image_url , 5 , PROJECT_ID )
@@ -197,6 +197,8 @@ def test_poll_discovery_occurrence(self):
197197 # we expect timeout error
198198 assert False
199199
200+ @pytest .mark .flaky (max_runs = 3 , min_passes = 1 )
201+ def test_poll_discovery_occurrence (self ):
200202 # create discovery occurrence
201203 note_id = 'discovery-note-{}' .format (uuid .uuid4 ())
202204 client = containeranalysis_v1 .ContainerAnalysisClient ()
@@ -220,7 +222,6 @@ def test_poll_discovery_occurrence(self):
220222 create_occurrence (parent = f"projects/{ PROJECT_ID } " ,
221223 occurrence = occurrence )
222224
223- # poll again
224225 disc = samples .poll_discovery_finished (self .image_url , 10 , PROJECT_ID )
225226 status = disc .discovery .analysis_status
226227 assert disc is not None
You can’t perform that action at this time.
0 commit comments