diff options
author | Chris Adams <chris.adams@qinetic.com.au> | 2018-07-19 18:22:12 +1000 |
---|---|---|
committer | Christopher Adams <chris.adams@jollamobile.com> | 2018-07-20 05:19:52 +0000 |
commit | 582018c0343f6e3ae3729c3f1b5138dbb43c5832 (patch) | |
tree | 934c056410e2cf03a70b5e60d259ff526ae1c798 | |
parent | bfd521d0a159fc6adca7f9e58fb9285953780ae2 (diff) |
Use hardcoded wait in specific test circumstance
Depending on the backend semantics, a given set of changes
may be batched as either one or multiple changes. Thus, we
don't know in the test how many change signals we need to
wait for. Thus, use an unconditional wait in this case.
Change-Id: Id3770adddb3f8b17708beeb2f119791271d125b1
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
-rw-r--r-- | tests/auto/organizer/qmlorganizer/testcases/tst_organizermodelupdate.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/organizer/qmlorganizer/testcases/tst_organizermodelupdate.qml b/tests/auto/organizer/qmlorganizer/testcases/tst_organizermodelupdate.qml index beb58fc74..b2c01488b 100644 --- a/tests/auto/organizer/qmlorganizer/testcases/tst_organizermodelupdate.qml +++ b/tests/auto/organizer/qmlorganizer/testcases/tst_organizermodelupdate.qml @@ -1005,7 +1005,11 @@ TestCase { // clean db model.startPeriod = localDate('2011-01-01'); model.endPeriod = localDate('2012-08-30'); - modelChangedSpy.wait(spyWaitDelay); + // depending on how the changes are batched there may + // be either one or more modelChanged signals. + // thus, unconditional wait() is required... + wait(spyWaitDelay); + verify(modelChangedSpy.count > 0); cleanDatabase(); compare(model.itemCount, 0, "Model not empty") } |