Skip to content
Commit ee20a09b authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

cts: fix android.net.cts.VpnServiceTest#testProtect_int flake



This is written based on observation that
  testStartVpnProfileNoPreviousConsent()
appears to result in the right things happening when running
  adb logcat | egrep --color -i 'Switched from |protect'
ie. it results in:
  I netd    : networkSetProtectDeny(<ctsappuid>) <0.01ms>
  I Vpn     : Switched from android.net.cts to [Legacy VPN]
  I netd    : networkSetProtectAllow(1000) <0.00ms>

Which disallows the CTS uid, and allows AID_SYSTEM.

That in turn appears to be the 'default' state of things.

So this basically copies that logic into tearDown()

Test: atest android.net.cts.{Ikev2VpnTest,VpnServiceTest} --iterations 2
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: Ic9cca56097d78ae48157e808081de2ebb76635e8
parent 8cfccc9d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment