diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-11 00:05:32 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-12-11 00:05:32 -0800 |
commit | 0d5028b3efa3fcc4d117843804e8c21d6e6c3ba6 (patch) | |
tree | 27450f93a2fb15e76d92b14ac0bd2a5af3921309 | |
parent | 3a0e9f2863696f3316400102f39ad4c9caccb395 (diff) | |
parent | 2eacd483279af9c2296d7aea99594ce3425d5d7d (diff) | |
download | tests-0d5028b3efa3fcc4d117843804e8c21d6e6c3ba6.tar.gz |
anycast_test.py: change to use thread.join to wait CloseFileDescriptorThread finished
am: 2eacd48327
Change-Id: Ie1a602345016d79e8da0fab23bd07583603850cf
-rwxr-xr-x | net/test/anycast_test.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/test/anycast_test.py b/net/test/anycast_test.py index 82130db..62d874e 100755 --- a/net/test/anycast_test.py +++ b/net/test/anycast_test.py @@ -93,7 +93,9 @@ class AnycastTest(multinetwork_base.MultiNetworkBaseTest): # This will hang if the kernel has the bug. thread = CloseFileDescriptorThread(self.tuns[netid]) thread.start() - time.sleep(0.1) + # Wait up to 0.5 seconds for the thread to finish, but + # continue and fail the test if the thread hangs. + thread.join(0.5) # Make teardown work. del self.tuns[netid] |