Test: tst_QFile::writeLargeDataBlock() unstable failure as XFAIL

While the large data block can be written to a file, the test is
also showing instability while reading back the written block.

Adding another expected failure to address this instability.

Task-number: QTBUG-26906

Change-Id: I9704d441cf2bd6d7ef0f9023240ea61bb89561b6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Caroline Chao 2012-09-26 08:02:49 +02:00 committed by The Qt Project
parent f8ca79579f
commit 371c21b9a8

View File

@ -2277,7 +2277,7 @@ void tst_QFile::writeLargeDataBlock()
qWarning() << qPrintable(QString("Error writing a large data block to [%1]: %2")
.arg(fileName)
.arg(file.errorString()));
QEXPECT_FAIL("unc file", "QTBUG-26906", Abort);
QEXPECT_FAIL("unc file", "QTBUG-26906 writing", Abort);
}
#endif
QCOMPARE( fileWriteOriginalData, originalDataSize );
@ -2294,9 +2294,17 @@ void tst_QFile::writeLargeDataBlock()
QVERIFY2( openFile(file, QIODevice::ReadOnly, (FileType)type),
qPrintable(QString("Couldn't open file for reading: [%1]").arg(fileName)) );
readData = file.readAll();
#if defined(Q_OS_WIN)
if (readData != originalData) {
qWarning() << qPrintable(QString("Error reading a large data block from [%1]: %2")
.arg(fileName)
.arg(file.errorString()));
QEXPECT_FAIL("unc file", "QTBUG-26906 reading", Abort);
}
#endif
closeFile(file);
}
QCOMPARE( readData, originalData );
QVERIFY( QFile::remove(fileName) );
}