[nearby] Fix flakeness in the unit test
Test: -m Ignore-AOSP-First: nearby not in aosp yet Fix: 302599461 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:08356f82527aad27dc9613f3e406f7732b363e42) Merged-In: Id438f453893e4e4adbd341ba36c4a0e3d3dbcb4f Change-Id: Id438f453893e4e4adbd341ba36c4a0e3d3dbcb4f
This commit is contained in:
committed by
Android Build Cherrypicker Worker
parent
64cbadfad9
commit
df7db9c554
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.server.nearby.provider;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.atLeastOnce;
|
||||
import static org.mockito.Mockito.eq;
|
||||
import static org.mockito.Mockito.times;
|
||||
@@ -69,7 +70,7 @@ public class BleBroadcastProviderTest {
|
||||
|
||||
AdvertiseSettings settings = new AdvertiseSettings.Builder().build();
|
||||
mBleBroadcastProvider.onStartSuccess(settings);
|
||||
verify(mBroadcastListener).onStatusChanged(eq(BroadcastCallback.STATUS_OK));
|
||||
verify(mBroadcastListener, times(any())).onStatusChanged(eq(BroadcastCallback.STATUS_OK));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -81,7 +82,7 @@ public class BleBroadcastProviderTest {
|
||||
// advertising set can not be mocked, so we will allow nulls
|
||||
mBleBroadcastProvider.mAdvertisingSetCallback.onAdvertisingSetStarted(null, -30,
|
||||
AdvertisingSetCallback.ADVERTISE_SUCCESS);
|
||||
verify(mBroadcastListener).onStatusChanged(eq(BroadcastCallback.STATUS_OK));
|
||||
verify(mBroadcastListener, times(any())).onStatusChanged(eq(BroadcastCallback.STATUS_OK));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user