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

Commit 1d0efbcd authored by mavishsu's avatar mavishsu
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: I9f5a3ac14a0c221690592e5b1260cc35dd42413f
parent ff834610
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,