tests/thread-pool-slow: change num-threads limit check

There is no guarantee that the thread pool will reach its limit afaict,
it depends how the system schedule the various threads. This fixes
random test failure on win32.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-10-14 16:58:13 +04:00
parent f23d8a9087
commit 2df5acf60a

View File

@ -291,7 +291,7 @@ test_thread_sort (gboolean sort)
} }
g_assert_cmpint (g_thread_pool_get_max_threads (pool), ==, (gint) max_threads); g_assert_cmpint (g_thread_pool_get_max_threads (pool), ==, (gint) max_threads);
g_assert_cmpuint (g_thread_pool_get_num_threads (pool), ==, g_assert_cmpuint (g_thread_pool_get_num_threads (pool), <=,
(guint) g_thread_pool_get_max_threads (pool)); (guint) g_thread_pool_get_max_threads (pool));
g_thread_pool_free (pool, TRUE, TRUE); g_thread_pool_free (pool, TRUE, TRUE);
} }