Ignore non-matching callbacks to fix flakiness

This is a host-side tests that receives its network callbacks
through a custom AIDL that proxies them to this host-side
process. As this runs of the real callbacks from a real network,
this test receives unrelated callbacks – in particular calls to
onCapabilitiesUpdated to warn the process of updates of the
signal strength.
This skips these callbacks across the board by only matching
the expected callback. This will fix flakiness in the test.

Also, as a drive-by fix, this also checks the network in
the onBlockedStatusChanged callback. If the network object
is not the expected one, the test should not pass.

Bug: 160270536
Test: NetworkCallbackTests
Change-Id: I67c685ebfb2c5e2ee6f7615196eedea8292ca3ff
1 file changed
tree: 23215a6a688b893221e507cc5a6512a3d9b8808b
  1. tests/