[libsoup] tests: fix another test broken by the SoupClientInputStream close change
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] tests: fix another test broken by the SoupClientInputStream close change
- Date: Tue, 8 Oct 2013 17:15:51 +0000 (UTC)
commit bf4afcdaa5443cb9bc8829817b3a510010a99325
Author: Dan Winship <danw gnome org>
Date: Tue Oct 8 13:12:56 2013 -0400
tests: fix another test broken by the SoupClientInputStream close change
One of connection-test's tests was failing (but only sporadically)
because it closed the stream without reading it, causing the stream to
be disconnected, while it was expecting the connection to stay open.
tests/connection-test.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/connection-test.c b/tests/connection-test.c
index cdc4cce..3d51753 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -325,6 +325,14 @@ do_timeout_req_test_for_session (SoupSession *session)
errors++;
g_clear_error (&error);
} else {
+ soup_test_request_read_all (req, stream, NULL, &error);
+ if (error) {
+ debug_printf (1, " Unexpected error on read: %s\n",
+ error->message);
+ errors++;
+ g_clear_error (&error);
+ }
+
soup_test_request_close_stream (req, stream, NULL, &error);
if (error) {
debug_printf (1, " Unexpected error on close: %s\n",
@@ -400,6 +408,7 @@ do_persistent_connection_timeout_test (void)
do_timeout_test_for_session (session);
soup_test_session_abort_unref (session);
+ debug_printf (1, " Async session, request API\n");
session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC,
SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
NULL);
@@ -411,6 +420,7 @@ do_persistent_connection_timeout_test (void)
do_timeout_test_for_session (session);
soup_test_session_abort_unref (session);
+ debug_printf (1, " Sync session, request API\n");
session = soup_test_session_new (SOUP_TYPE_SESSION_SYNC, NULL);
do_timeout_req_test_for_session (session);
soup_test_session_abort_unref (session);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]