mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 02:06:18 +01:00
tests: Remove unnecessary subprocess from dataset tests
The dataset tests are using a subprocess to catch possible deadlocks within the `test_datalist_clear()` test. However, that’s causing occasional spurious test failures on the slower CI runners, where the subprocess can take longer than 500ms to run due to the machine being overloaded. Remove the subprocess from the test, and allow the test to deadlock if it fails. The Meson test harness has a timeout for catching things like this. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
afcb839121
commit
1df5759db9
@ -192,20 +192,12 @@ free_one (gpointer data)
|
||||
|
||||
static void
|
||||
test_datalist_clear (void)
|
||||
{
|
||||
/* Need to use a subprocess because it will deadlock if it fails */
|
||||
if (g_test_subprocess ())
|
||||
{
|
||||
g_datalist_init (&global_list);
|
||||
g_datalist_set_data_full (&global_list, "one", GINT_TO_POINTER (1), free_one);
|
||||
g_datalist_set_data_full (&global_list, "two", GINT_TO_POINTER (2), NULL);
|
||||
g_datalist_clear (&global_list);
|
||||
g_assert (global_list == NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
g_test_trap_subprocess (NULL, 500000, G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_passed ();
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user