[libsoup] http2-test: check the connection is idle when not messages reference it
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] http2-test: check the connection is idle when not messages reference it
- Date: Fri, 21 May 2021 10:59:30 +0000 (UTC)
commit 16ddc7fa6331688a130360d32bec30a26b4383f5
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Fri May 21 12:45:21 2021 +0200
http2-test: check the connection is idle when not messages reference it
tests/http2-test.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/tests/http2-test.c b/tests/http2-test.c
index 7a48ce88..a6d24640 100644
--- a/tests/http2-test.c
+++ b/tests/http2-test.c
@@ -448,7 +448,11 @@ do_connections_test (Test *test, gconstpointer data)
g_main_context_iteration (async_context, TRUE);
}
- // After no messages reference the connection we should still be able to re-use the same connection
+ while (g_main_context_pending (async_context))
+ g_main_context_iteration (async_context, FALSE);
+
+ /* After no messages reference the connection it should be IDLE and reusable */
+ g_assert_cmpuint (soup_connection_get_state (last_connection), ==, SOUP_CONNECTION_IDLE);
SoupMessage *msg = soup_message_new ("GET", "https://127.0.0.1:5000/slow");
soup_session_send_async (test->session, msg, G_PRIORITY_DEFAULT, NULL, on_send_ready,
&complete_count);
g_object_unref (msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]