Fix randomly failing archivetest
Closed, ResolvedPublic

Description

Regression introduced by commit 8fd9487.

The test fails in a non-reproducible manner.

Example debug output for a couple of failures:

QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/test1.txt"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/B"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/B/test1.txt"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/B/C"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/B/C/test1.txt"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/B/C/test2.txt"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/B/test2.txt"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/A/test2.txt"
QDEBUG : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) "/tmp/archivetest-Zlj0jm/archivetest-uyzjCG"
FAIL!  : ArchiveTest::testExtraction(extract the whole one_toplevel_folder.zip) Compared values are not the same
   Actual   (extractedEntriesCount)        : 10
   Expected (expectedExtractedEntriesCount): 9
   Loc: [/home/elvis/dev/kde/src/ark/autotests/kerfuffle/archivetest.cpp(295)]

and:

QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/C"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/C/test2.txt"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/C/test1.txt"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/test2.txt"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/archivetest-PolpQE"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/archivetest-PolpQE/A"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/archivetest-PolpQE/A/B"
QDEBUG : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) "/tmp/archivetest-kUZspk/archivetest-PolpQE/A/B/C"
FAIL!  : ArchiveTest::testExtraction(extract selected entries from a zip, drag-and-drop) Compared values are not the same
   Actual   (extractedEntriesCount)        : 8
   Expected (expectedExtractedEntriesCount): 4
   Loc: [/home/elvis/dev/kde/src/ark/autotests/kerfuffle/archivetest.cpp(295)]