diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-11-05 09:56:47 -0400 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2010-11-05 09:56:47 -0400 |
commit | 83f1a6394b90a9c0ddfae9cddc32178fec07ac77 (patch) | |
tree | 7f61d90e99eaa6b8438aaef246b351c5cfd4d2df /src | |
parent | e38cddbb8e8d601928bad36443f4a43dcdaa09e0 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/up-self-test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/up-self-test.c b/src/up-self-test.c index 8fa4600..4e0095d 100644 --- a/src/up-self-test.c +++ b/src/up-self-test.c @@ -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 */ |