diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-19 17:10:50 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-23 10:42:47 +0200 |
commit | 1e521596c103cf6d742e8b73f641b29aa0737b94 (patch) | |
tree | 344e08ad3000f65b6a85db19a611e0446cdf2541 | |
parent | 54ef480a8a10c4b43126763cdf348d3517a16b3c (diff) |
Stabilize flaky tests
When testing model resets, wait until it reports data using tryVerify
instead of a hardcoded single milisecond.
Change-Id: Id3f3464f54a2b05e25c602594357e767eb8bbdba
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit ee7e5de79f83625df1adfb244b0d608dae480728)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | tests/auto/declarative_location_core/utils.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/declarative_location_core/utils.js b/tests/auto/declarative_location_core/utils.js index 2b7dca32..025f7771 100644 --- a/tests/auto/declarative_location_core/utils.js +++ b/tests/auto/declarative_location_core/utils.js @@ -146,8 +146,7 @@ function testReset(testCase, model, place) dataModel.model = model; model.place = place; - testCase.wait(1); - testCase.verify(model.totalCount > 0); + testCase.tryVerify(() => { return model.totalCount > 0 }, 100); testCase.verify(dataModel.items.count > 0); model.place = null; |