OSDN Git Service

ConnectivityServiceTest: remove flaky waitForIdle test.
authorHugo Benichi <hugobenichi@google.com>
Mon, 17 Oct 2016 06:54:51 +0000 (15:54 +0900)
committerHugo Benichi <hugobenichi@google.com>
Tue, 24 Jan 2017 06:22:48 +0000 (15:22 +0900)
commitad4db4ed58e553a1057ad0b5d5d61de4318e8247
tree9d1f4eb97a257546fcef3a0de9d27cecb88a2078
parent9fc8d99c768ee1c48591513ccd63af6032b0446b
ConnectivityServiceTest: remove flaky waitForIdle test.

This patch removes testNotWaitingForIdleCausesRaceConditions() from
ConnectivityServiceTest because it is in nature flaky and prevents using
ConnectivityServiceTest as a patch presubmit check. Estimated failure
rate is 1/15 on Nexus 6p.

This patch also simplifies how ConnectivityServiceTest waits for
handlers to become idle by removing IdleableHandlerThread and turning it
into a signle static method.

Test: $ runtest frameworks-net
Bug: 31479480
Change-Id: I2d78709cbb61d5d01cd59cff326469417f73f1ab
services/core/java/com/android/server/ConnectivityService.java
tests/net/java/com/android/server/ConnectivityServiceTest.java