Merge "Ensure requestTetheredInterface() is processed before proceeding" into main
This commit is contained in:
commit
d3295c8747
1 changed files with 6 additions and 1 deletions
|
|
@ -618,7 +618,12 @@ class EthernetManagerTest {
|
|||
// see aosp/2123900.
|
||||
try {
|
||||
// assumeException does not exist.
|
||||
requestTetheredInterface().expectOnAvailable(NO_CALLBACK_TIMEOUT_MS)
|
||||
val listener = requestTetheredInterface()
|
||||
// Force requestTetheredInterface() to be processed before proceeding by calling
|
||||
// setEthernetEnabled() which always waits on a callback and is guaranteed to be
|
||||
// processed after requestTetheredInterface().
|
||||
setEthernetEnabled(ethernetEnabled)
|
||||
listener.expectOnAvailable(0)
|
||||
// interface used for tethering is available, throw an assumption error.
|
||||
assumeTrue(false)
|
||||
} catch (e: TimeoutException) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue