[libsoup/wip/http2: 2/2] tests: fix http2 tests
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/http2: 2/2] tests: fix http2 tests
- Date: Wed, 12 May 2021 00:48:24 +0000 (UTC)
commit 26eddbf49442589c160a1e684bcbffa7bf2d176e
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 fcf5a457..fef69cb3 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);
@@ -209,6 +212,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);
@@ -245,6 +251,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);
@@ -271,6 +280,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);
@@ -372,6 +384,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]