Merge branch 'fix-async' into 'main'

glib/tests/asyncqueue.c: skip test_async_queue_timed in 2038 or later

See merge request GNOME/glib!3550
This commit is contained in:
Philip Withnall 2023-08-24 19:45:10 +00:00
commit fd2d1e829e

View File

@ -220,6 +220,15 @@ test_async_queue_timed (void)
gint64 start, end, diff;
gpointer val;
GDateTime *dt = g_date_time_new_now_utc ();
int year = g_date_time_get_year (dt);
g_date_time_unref (dt);
if (year >= 2038)
{
g_test_skip ("Test relies on GTimeVal which is Y2038 unsafe and will cause a failure.");
return;
}
g_get_current_time (&tv);
if (g_test_undefined ())
{