Testsuite: Reduce race condition in history purging check

Previously we set the "max age" to seconds and then waited for exactly 2
seconds until we wrote the history data back to files. In a lot of cases this
actually took a tad more than 2 seconds, which caused the second-last history
entry to disappear as well.

Reduce the waiting to 1.1 seconds, which will now give us 900 ms to write back
the history file. Still not ideal, but the best we can do in the test suite.
This commit is contained in:
Martin Pitt 2010-11-05 09:56:47 -04:00
parent e38cddbb8e
commit 83f1a6394b

View file

@ -223,7 +223,7 @@ up_test_history_func (void)
/* ensure old entries are purged */
up_history_set_max_data_age (history, 2);
g_usleep (2 * G_USEC_PER_SEC);
g_usleep (1100 * G_USEC_PER_SEC / 1000);
g_object_unref (history);
/* ensure only 2 points are returned */