Fix tst_QFileSystemWatcher failure on Mac OS X
authorBradley T. Hughes <bradley.hughes@nokia.com>
Tue, 14 Feb 2012 06:03:18 +0000 (07:03 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Feb 2012 04:25:26 +0000 (05:25 +0100)
commit2193df65a380e27b839bae3dc63ad7496af575e8
treedd049950377f2450b685f8ffd4fe7bb89038c7fe
parent64642a4d9768b767c51c7f92dec94f655ba60195
Fix tst_QFileSystemWatcher failure on Mac OS X

The watchFileAndItsDirectory() test would fail due to atime updates for
the first watched file coming up to 2 seconds after the file was closed.
Observation shows that the atime has a 2 second resolution on Mac OS X
using HFS+, so add an appropriate delay to make sure that the atime
update from the kqueue based file system watcher can dispatch all
updates.

Task-number: QTBUG-22744
Change-Id: Ie79af20d6b4c154021307c8a8f6d336369720337
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp