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

Commit 25119098 authored by mavishsu's avatar mavishsu Committed by Andy Chou
Browse files

Fix CarrierServiceStateTrackerTest.testSendPrefNetworkNotification bug.

Unable to control the number of ContentObserver's onChanged callback.
Add atLeast(1) to Mockito.verify method to slove it.
Bug: 117198385
Test: atest CarrierServiceStateTrackerTest
Change-Id: Ic21869ddb3ba6c2025e0572b137cc91ef4d3ff6b
parent aca44d3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ public class CarrierServiceStateTrackerTest extends TelephonyTest {
        mSpyCarrierSST.getContentObserver().dispatchChange(false,
                Settings.Global.getUriFor(prefNetworkMode));
        waitForMs(500);
        verify(mNotificationManager).notify(
        verify(mNotificationManager, atLeast(1)).notify(
                eq(CarrierServiceStateTracker.NOTIFICATION_PREF_NETWORK), isA(Notification.class));

        Settings.Global.putInt(mContext.getContentResolver(), prefNetworkMode,