From e1b6966d43f734e7985433cfedcd4db415d95bab Mon Sep 17 00:00:00 2001 From: Haoyu Zhang Date: Thu, 4 Jun 2020 18:17:24 -0700 Subject: [PATCH] Use coordinator.join instead of joining threads to make sure thread exceptions are reliably thrown. PiperOrigin-RevId: 314842568 Change-Id: I8be3f86eabeb4f44dd96b2303da720761bb1ea2a --- tensorflow/python/eager/remote_cluster_test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tensorflow/python/eager/remote_cluster_test.py b/tensorflow/python/eager/remote_cluster_test.py index 025899e271e..efe4e08cbf7 100644 --- a/tensorflow/python/eager/remote_cluster_test.py +++ b/tensorflow/python/eager/remote_cluster_test.py @@ -530,8 +530,7 @@ class DynamicClusterTest(test.TestCase, parameterized.TestCase): threads.append(threading.Thread(target=update_server_def_fn)) for t in threads: t.start() - for t in threads: - t.join() + self._coord.join(threads) for result in results: np.testing.assert_array_equal([[2, 2], [2, 2]], result)