summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2019-04-10 09:21:18 -0700
committerEtan Cohen <etancohen@google.com>2019-04-10 09:21:18 -0700
commitd8a8b8f79140b39ce2e9a5417e0d9b97073e8053 (patch)
tree24fc86d8225ba6f734c74357b640144f9dae4602 /tests
parent6aa0c4977b5ab97376d95379e0392f66f192e0ee (diff)
[AWARE] Verify the peer ID is consistent for re-discover
Verify that the peer ID is persistent when re-discovery the same peer (e.g. due to a peer updating its publish session). Bug: 130254999 Test: atest WifiAwareStateManagerTest Change-Id: Iad109cfe69bff0064f310d72b51639be3130a775
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
index b4f93c123..04ecfe7d4 100644
--- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
@@ -1418,6 +1418,7 @@ public class WifiAwareStateManagerTest {
inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
eq(peerMatchFilter.getBytes()));
inOrderM.verify(mAwareMetricsMock).recordMatchIndicationForRangeEnabledSubscribe(false);
+ int peerId1 = peerIdCaptor.getValue();
mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
peerMatchFilter.getBytes(), EGRESS_MET_MASK, rangedDistance);
@@ -1425,6 +1426,9 @@ public class WifiAwareStateManagerTest {
inOrder.verify(mockSessionCallback).onMatchWithDistance(peerIdCaptor.capture(),
eq(peerSsi.getBytes()), eq(peerMatchFilter.getBytes()), eq(rangedDistance));
inOrderM.verify(mAwareMetricsMock).recordMatchIndicationForRangeEnabledSubscribe(true);
+ int peerId2 = peerIdCaptor.getValue();
+
+ assertEquals(peerId1, peerId2);
// (3) message Rx
mDut.onMessageReceivedNotification(subscribeId, requestorId, peerMac, peerMsg.getBytes());