[libsoup/wip/http2: 14/16] tests: fix http2 tests
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/http2: 14/16] tests: fix http2 tests
- Date: Sun, 16 May 2021 13:20:00 +0000 (UTC)
commit 271453bb0dc66fe058654be620c1598f70bb2800
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon May 10 13:38:13 2021 +0200
tests: fix http2 tests
tests/http2-test.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/tests/http2-test.c b/tests/http2-test.c
index ab39cc0a..f7828bfc 100644
--- a/tests/http2-test.c
+++ b/tests/http2-test.c
@@ -161,6 +161,9 @@ do_multi_message_async_test (Test *test, gconstpointer data)
g_assert_cmpstr (g_bytes_get_data (response1, NULL), ==, "body%201");
g_assert_cmpstr (g_bytes_get_data (response2, NULL), ==, "body%202");
+ while (g_main_context_pending (async_context))
+ g_main_context_iteration (async_context, FALSE);
+
g_bytes_unref (response1);
g_bytes_unref (response2);
g_object_unref (msg1);
@@ -249,6 +252,9 @@ do_post_async_test (Test *test, gconstpointer data)
g_assert_cmpstr (g_bytes_get_data (response, NULL), ==, "body 1");
+ while (g_main_context_pending (async_context))
+ g_main_context_iteration (async_context, FALSE);
+
g_bytes_unref (response);
g_bytes_unref (bytes);
g_main_context_unref (async_context);
@@ -281,6 +287,9 @@ do_post_blocked_async_test (Test *test, gconstpointer data)
g_assert_cmpstr (g_bytes_get_data (response, NULL), ==, "Part 1 - Part 2");
+ while (g_main_context_pending (async_context))
+ g_main_context_iteration (async_context, FALSE);
+
g_bytes_unref (response);
g_object_unref (in_stream);
g_main_context_unref (async_context);
@@ -307,6 +316,9 @@ do_post_file_async_test (Test *test, gconstpointer data)
g_assert_true (g_str_has_prefix (g_bytes_get_data (response, NULL), "-----BEGIN CERTIFICATE-----"));
+ while (g_main_context_pending (async_context))
+ g_main_context_iteration (async_context, FALSE);
+
g_bytes_unref (response);
g_object_unref (in_stream);
g_object_unref (in_file);
@@ -408,6 +420,9 @@ do_connections_test (Test *test, gconstpointer data)
soup_session_send_async (test->session, msg, G_PRIORITY_DEFAULT, NULL, on_send_ready,
&complete_count);
g_object_unref (msg);
+ while (g_main_context_pending (async_context))
+ g_main_context_iteration (async_context, FALSE);
+
g_main_context_unref (async_context);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]