Avoid deadlock by sleeping for a longer duration.
authorFrank Chen <frankchn@google.com>
Tue, 9 Jan 2018 05:11:20 +0000 (21:11 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 9 Jan 2018 05:14:43 +0000 (21:14 -0800)
PiperOrigin-RevId: 181263637

tensorflow/contrib/data/python/kernel_tests/interleave_dataset_op_test.py

index e13c60c9a71d248ba7140feda40139ad65965aeb..b1937c08f347734d0d6871bd30ed209ff520623a 100644 (file)
@@ -524,7 +524,7 @@ class ParallelInterleaveDatasetTest(test.TestCase):
           self.read_coordination_events[expected_element].acquire()
         else:
           self.write_coordination_events[expected_element].set()
-        time.sleep(0.1)  # Sleep to consistently "avoid" the race condition.
+        time.sleep(0.5)  # Sleep to consistently "avoid" the race condition.
         actual_element = sess.run(self.next_element)
         if not done_first_event:
           done_first_event = True
@@ -611,7 +611,7 @@ class ParallelInterleaveDatasetTest(test.TestCase):
           self.read_coordination_events[expected_element].acquire()
         else:
           self.write_coordination_events[expected_element].set()
-        time.sleep(0.1)  # Sleep to consistently "avoid" the race condition.
+        time.sleep(0.5)  # Sleep to consistently "avoid" the race condition.
         actual_element = sess.run(self.next_element)
         if not done_first_event:
           done_first_event = True