Fix flaky testUidTagStateDetails
This includes:
1. Specify a read timeout: At present, the test only specifies
a connect timeout and terminates if the timeout is exceeded.
However, if the connection takes a long time to establish,
there may be very little time left for the test to perform
a read operation.
2. Read only the initial bytes: Since the exact amount of data
is not important for the test, it is preferable to read only
a small amount of data at the beginning rather than reading
the entire content.
Test: atest CtsNetTestCases:android.net.cts.NetworkStatsManagerTest \
--rerun-until-failure 100
Fix: 274835045
Change-Id: If53a8db7ab6c5df462757d80b563de89531c3c3f
1 file changed