diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2019-01-18 14:09:45 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2019-01-18 14:29:10 +0000 |
commit | 009b76057e8264cd7f137fc246c0b54186d5f371 (patch) | |
tree | 6651b03e231cca804728451b89dd977e25f81eed | |
parent | 820db21f6ba19a43383b95d9ed7dde7aff955e3e (diff) |
Fix the flaky applicationinstaller autotest
Sometimes the mount is not finished yet when we want to create the folder
for the images. By waiting at least 200ms we can be sure it's finished.
Change-Id: Ic29084f28d64c4e9576fba6370e78f3cf56f7e31
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | tests/applicationinstaller/tst_applicationinstaller.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/applicationinstaller/tst_applicationinstaller.cpp b/tests/applicationinstaller/tst_applicationinstaller.cpp index d3d5b80a..80fa4601 100644 --- a/tests/applicationinstaller/tst_applicationinstaller.cpp +++ b/tests/applicationinstaller/tst_applicationinstaller.cpp @@ -340,6 +340,10 @@ void tst_ApplicationInstaller::initTestCase() QVERIFY2(m_sudo->mkfs(m_loopbackForSDCard[i], "vfat"), qPrintable(m_sudo->lastError())); QVERIFY2(m_sudo->mount(m_loopbackForSDCard[i], pathTo(i == 0 ? SDCard0 : SDCard1), false, "vfat"), qPrintable(m_sudo->lastError())); + // Wait for the mount to be completed. Usually this is not needed, but sometimes the + // mount takes longer and then the mkdir command will fail afterwards. + QTest::qSleep(200); + // those paths have been hidden due to the mount, so recreate them QVERIFY(QDir().mkdir(pathTo(i == 0 ? SDCard0Images : SDCard1Images))); } |