Stabilize tst_qabstractslider
When simulating hight load, this test failed 4 times out of 80 runs on my machine. With this patch I could no longer reproduce the failure. Change-Id: I42748de0200b9094c8facf0e33f3794002ec1d01 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
parent
4ce32f664d
commit
4730742f69
@ -1244,17 +1244,17 @@ void tst_QAbstractSlider::setRepeatAction()
|
||||
QCOMPARE(slider->value(), 55);
|
||||
|
||||
waitUntilTimeElapsed(t, 550);
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QTRY_COMPARE(spy.count(), 1);
|
||||
QCOMPARE(slider->value(), 65);
|
||||
QCOMPARE(spy.at(0).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
|
||||
|
||||
waitUntilTimeElapsed(t, 790);
|
||||
QCOMPARE(spy.count(), 2);
|
||||
QTRY_COMPARE(spy.count(), 2);
|
||||
QCOMPARE(slider->value(), 75);
|
||||
QCOMPARE(spy.at(1).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
|
||||
|
||||
waitUntilTimeElapsed(t, 1790);
|
||||
QCOMPARE(spy.count(), 6);
|
||||
QTRY_COMPARE(spy.count(), 6);
|
||||
QCOMPARE(slider->value(), 115);
|
||||
QCOMPARE(spy.at(4).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
|
||||
QCOMPARE(spy.at(5).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user