fix flaky test multi_process_runner_test on tensorflow msan TAP. allow more margin of errors.

PiperOrigin-RevId: 316708284
Change-Id: I3ab912bd7a546bbedf5ed7825fa4b345e92880d8
This commit is contained in:
A. Unique TensorFlower 2020-06-16 10:29:33 -07:00 committed by TensorFlower Gardener
parent 7fb05db5b0
commit c42314ef70

View File

@ -314,8 +314,12 @@ class MultiProcessRunnerTest(test.TestCase):
timeout=5) timeout=5)
list_to_assert = cm.exception.mpr_result.stdout list_to_assert = cm.exception.mpr_result.stdout
# We should see 5 iterations from worker and ps, however sometime on TAP
# due to CPU throttling and slugginess of msan/asan build, this became
# flaky. Therefore we allow more margin of errors to only check the first
# 3 iterations.
for job in ['worker', 'ps']: for job in ['worker', 'ps']:
for iteration in range(0, 5): for iteration in range(0, 3):
self.assertTrue( self.assertTrue(
any('(logging) {}-0, i: {}'.format(job, iteration) in line any('(logging) {}-0, i: {}'.format(job, iteration) in line
for line in list_to_assert)) for line in list_to_assert))