File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -190,8 +190,13 @@ def test_debugger_stop_gpu(request):
190190 The notification had to be triggered by { low_gpu_lambda .handler } .
191191 """
192192 topic_name = sns_notification_topic_arn .split (':' )[- 1 ]
193- time .sleep (120 ) # wait for SNS metrics to populate
194- metrics_count = SSHLog ().count_sns_notifications (topic_name , timedelta (minutes = 15 ))
193+ metrics_count = 0
194+ for i in range (1 , 10 ):
195+ metrics_count = SSHLog ().count_sns_notifications (topic_name , timedelta (minutes = 15 ))
196+ logging .info (f"Recent SNS notifications received: { metrics_count } " )
197+ if metrics_count > 0 :
198+ break
199+ time .sleep (30 ) # wait for SNS metrics to populate
195200 assert metrics_count > 0 , 'SNS notification had to be triggered by Low GPU Lambda'
196201
197202
You can’t perform that action at this time.
0 commit comments