Skip to content

Commit 496bafc

Browse files
vkrauseTheOneRing
authored andcommitted
Attempt to stabilze the RemoveView test on Windows
This test relies way too much on timing and assumptions about how rendering is going to work in general, it probably needs to be refactored to be more independent of all that.
1 parent fd3722b commit 496bafc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ build_script:
3838
on_success:
3939
- ps: |
4040
craft --src-dir $env:APPVEYOR_BUILD_FOLDER --package gammaray
41-
Get-ChildItem C:\CraftMaster\$env:TARGET\tmp\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
41+
Get-ChildItem C:\CraftMaster\$env:TARGET\tmp\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName $_.Name}
4242
4343
on_finish:
4444
- ps: |

tests/quickinspectortest2.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ private slots:
125125
remoteView->setViewActive(true);
126126
// Activating the view trigger an update request
127127
QVERIFY(waitForSignal(&updatedSpy, true));
128-
QCOMPARE(requestedSpy.count(), 1);
129-
QCOMPARE(updatedSpy.count(), 1);
128+
QVERIFY(requestedSpy.count() == 1 || requestedSpy.count() == 2); // should be 1, but we might see spuroious repaints on windows
129+
QVERIFY(updatedSpy.count() == 1 || updatedSpy.count() == 2);
130130
if (!clientIsReplying)
131131
remoteView->clientViewUpdated();
132132

@@ -147,6 +147,7 @@ private slots:
147147
remoteView->clientViewUpdated();
148148
}
149149

150+
QVERIFY(waitForSignal(&requestedSpy, true));
150151
QCOMPARE(requestedSpy.count(), 1);
151152
QCOMPARE(updatedSpy.count(), 1);
152153
} else {
@@ -201,8 +202,8 @@ private slots:
201202
rootItem->setProperty("animated", false);
202203
QTest::qWait(qRound(animationDuration));
203204

204-
QVERIFY(requestedSpy.count() <= qRound(maxPossibleThrottledRequests * 1.05));
205-
QVERIFY(updatedSpy.count() <= qRound(maxPossibleThrottledRequests * 1.05));
205+
QVERIFY(requestedSpy.count() <= qRound(maxPossibleThrottledRequests * 1.05) + 1);
206+
QVERIFY(updatedSpy.count() <= qRound(maxPossibleThrottledRequests * 1.05) + 1);
206207
QCOMPARE(requestedSpy.count(), updatedSpy.count());
207208

208209
requestedSpy.clear();

0 commit comments

Comments
 (0)