android_packages_modules_Co.../staticlibs/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chalard Jean 00275e3f44 Don't blame a non-existent test for not restoring default networking
RestoreDefaultNetwork is a virtual test, causing a lot of confusion among
testers who can't reproduce or run this test.
Instead, blame the test that actually failed to restore the default network.

Before :
```
[1/2] android.net.cts.MultinetworkApiTest#testFoo: PASSED (253ms)
[2/2] android.net.cts.MultinetworkApiTest#RestoreDefaultNetwork: FAILED (54ms)

STACKTRACE:
java.lang.IllegalStateException: testFoo does not restore the default network. Default network has caps null ; expected a network with transports = WIFI
        at com.android.testutils.DefaultNetworkRestoreMonitor$listener$1.testFinished(DefaultNetworkRestoreMonitor.kt:64)
```

After :
```
[1/2] android.net.cts.MultinetworkApiTest#testFoo: PASSED (353ms)
[2/2] android.net.cts.MultinetworkApiTest#testFoo: FAILED (54ms)

STACKTRACE:
java.lang.IllegalStateException: testFoo does not restore the default network. Default network has caps null ; expected a network with transports = WIFI
        at com.android.testutils.DefaultNetworkRestoreMonitor$listener$1.testFinished(DefaultNetworkRestoreMonitor.kt:64)
```

Test: this
Flag: EXEMPT test-only
Bug: 413188127
Change-Id: Ia17bc9ddeedbd9303e5788ef79fb190e6e9dca1e
2025-06-20 15:12:31 +09:00
..
unit Don't blame a non-existent test for not restoring default networking 2025-06-20 15:12:31 +09:00