summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHugo Benichi <hugobenichi@google.com>2016-11-15 13:42:34 +0900
committerLorenzo Colitti <lorenzo@google.com>2017-01-26 18:52:18 +0900
commitd49596f479d19b1f2decd1c71fb7abbc85682d55 (patch)
treef456a088341232a75ff11c50f999e4577cd539a8 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentb038044758b2699f22b1215fe3a7ac4ed9a7a15a (diff)
ConnectivityServiceTest: fix testAvoidBadWifiSettings
This patch introduces an assertEventuallyThat helper function in ConnectivityServiceTest which given a boolean function retries until the function returns true or until a maximum retry time is reached. This function is used to fix flakyness of testAvoidBadWifiSetting where the Message posted by reevaluate() could reach the Handler's MessageQueue after waitForIdle takes effect, resulting in the test to fail. Instead of fixing the flakyness by introdcing hard sleep times, assertEventuallyThat is used to reduce the overall test time. With this change the test has been observed to pass with 100% success rate over 50000 invocations. Test: $ runtest frameworks-net Bug: 32561414 (cherry picked from commit 99c8294ef0c7a720364abb5884063e0a9d1bb5fe) Change-Id: If41a24989d5f65aeb439f68741f511b5eb53b18d
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions