From 68454864fc346c03787aac78fc88af0d1330d84d Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Tue, 14 Mar 2023 20:23:42 +0000 Subject: [PATCH] EthernetTetheringTest: join handler thread after calling quitSafely Somewhat surprisingly, HandlerThread#quitSafely is *not* a synchronous method, so the tearDown() method still needs to wait for the thread to join. Test: TH Change-Id: I4297ba057b3d4e67c7b462b6995da637f2479d42 --- .../integration/base/android/net/EthernetTetheringTestBase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java b/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java index f2cf1d0f1e..69eb58f84b 100644 --- a/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java +++ b/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java @@ -253,6 +253,7 @@ public abstract class EthernetTetheringTestBase { if (mRunTests) cleanUp(); } finally { mHandlerThread.quitSafely(); + mHandlerThread.join(); mUiAutomation.dropShellPermissionIdentity(); } }