File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tensorflow/python/distribute Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ def fn():
433433 return_output = True )
434434 mpr .start ()
435435 with self .assertRaises (ValueError ) as cm :
436- mpr .join (timeout = 10 )
436+ mpr .join (timeout = 20 )
437437 self .assertGreater (
438438 sum (['Running' in msg for msg in cm .exception .mpr_result .stdout ]), 1 )
439439
@@ -479,6 +479,7 @@ def test_auto_restart_terminate(self):
479479 # Tasks terminated by the user should also be restarted.
480480
481481 def fn (counter ):
482+ logging .warning (f"worker fn { counter .value } " )
482483 counter .value += 1
483484 if counter .value == 1 :
484485 time .sleep (100 )
@@ -493,7 +494,8 @@ def fn(counter):
493494 args = (counter ,),
494495 auto_restart = True )
495496 mpr .start ()
496- time .sleep (3 )
497+ time .sleep (10 )
498+ logging .warning ("terminating worker!" )
497499 mpr .terminate ('worker' , 0 )
498500 mpr .join (timeout = 20 )
499501 self .assertEqual (counter .value , 2 )
You can’t perform that action at this time.
0 commit comments