Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tensorflow/python/distribute/multi_process_runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def fn():
return_output=True)
mpr.start()
with self.assertRaises(ValueError) as cm:
mpr.join(timeout=10)
mpr.join(timeout=20)
self.assertGreater(
sum(['Running' in msg for msg in cm.exception.mpr_result.stdout]), 1)

Expand Down Expand Up @@ -479,6 +479,7 @@ def test_auto_restart_terminate(self):
# Tasks terminated by the user should also be restarted.

def fn(counter):
logging.warning(f"worker fn {counter.value}")
counter.value += 1
if counter.value == 1:
time.sleep(100)
Expand All @@ -493,7 +494,8 @@ def fn(counter):
args=(counter,),
auto_restart=True)
mpr.start()
time.sleep(3)
time.sleep(10)
logging.warning("terminating worker!")
mpr.terminate('worker', 0)
mpr.join(timeout=20)
self.assertEqual(counter.value, 2)
Expand Down