mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
Merge branch 'wait-for-nothing' into 'main'
tests: Remove a manual timeout from desktop-app-info test See merge request GNOME/glib!3083
This commit is contained in:
commit
291ca47bd5
@ -582,20 +582,8 @@ wait_for_file (const gchar *want_this,
|
|||||||
const gchar *but_not_this,
|
const gchar *but_not_this,
|
||||||
const gchar *or_this)
|
const gchar *or_this)
|
||||||
{
|
{
|
||||||
guint retries = 600;
|
|
||||||
|
|
||||||
/* I hate time-based conditions in tests, but this will wait up to one
|
|
||||||
* whole minute for "touch file" to finish running. I think it should
|
|
||||||
* be OK.
|
|
||||||
*
|
|
||||||
* 600 * 100ms = 60 seconds.
|
|
||||||
*/
|
|
||||||
while (access (want_this, F_OK) != 0)
|
while (access (want_this, F_OK) != 0)
|
||||||
{
|
g_usleep (100000); /* 100ms */
|
||||||
g_usleep (100000); /* 100ms */
|
|
||||||
g_assert_cmpuint (retries, >, 0);
|
|
||||||
retries--;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_assert_cmpuint (access (but_not_this, F_OK), !=, 0);
|
g_assert_cmpuint (access (but_not_this, F_OK), !=, 0);
|
||||||
g_assert_cmpuint (access (or_this, F_OK), !=, 0);
|
g_assert_cmpuint (access (or_this, F_OK), !=, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user