Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83297f29 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix WifiTrackerTest stopTrackingShouldRemove . . ."

parents 88a149f2 fd4a90db
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -767,10 +767,12 @@ public class WifiTrackerTest {
        WifiTracker tracker = createMockedWifiTracker();
        startTracking(tracker);

        CountDownLatch ready = new CountDownLatch(1);
        CountDownLatch latch = new CountDownLatch(1);
        CountDownLatch lock = new CountDownLatch(1);
        tracker.mMainHandler.post(() -> {
            try {
                ready.countDown();
                lock.await();
                latch.countDown();
            } catch (InterruptedException e) {
@@ -786,6 +788,9 @@ public class WifiTrackerTest {
        tracker.mMainHandler.sendEmptyMessage(
                WifiTracker.MainHandler.MSG_WIFI_STATE_CHANGED);

        try {
            ready.await(); // Make sure we have entered the first message handler
        } catch (InterruptedException e) {}
        tracker.onStop();

        verify(mockWifiListener, atMost(1)).onAccessPointsChanged();