[libsoup/gnome-3-38] tests/connection-test: Update expected events for GLib 2.67
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/gnome-3-38] tests/connection-test: Update expected events for GLib 2.67
- Date: Fri, 5 Mar 2021 08:35:59 +0000 (UTC)
commit f9061aada1b6eff651843e830406d1d8af1bd9bb
Author: Iain Lane <iainl gnome org>
Date: Thu Mar 4 21:59:00 2021 +0000
tests/connection-test: Update expected events for GLib 2.67
See GLib commit f0a7b147806e852e2090eeda6e4e38f7d3f52b52 for full
details, but now the extra RESOLVING event is not emitted any more.
To cater for situations where libsoup is run against an older version of
GLib, keep a runtime check for older versions.
Fixes: #215
tests/connection-test.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/tests/connection-test.c b/tests/connection-test.c
index 7e430801..08400fb9 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -1100,6 +1100,7 @@ do_connection_connect_test (void)
SoupURI *file_uri;
SoupURI *wrong_http_uri;
SoupURI *proxy_uri;
+ const char *wrong_http_uri_events;
SOUP_TEST_SKIP_IF_NO_APACHE;
@@ -1143,9 +1144,17 @@ do_connection_connect_test (void)
debug_printf (1, " wrong http (invalid port)\n");
wrong_http_uri = soup_uri_new (HTTP_SERVER);
wrong_http_uri->port = 1234;
+ if (glib_check_version (2, 67, 0) == NULL) {
+ wrong_http_uri_events = "rRc";
+ } else {
+ /* The extra "r" here is for a GLib bug in versions before
+ * 2.67.0. See f0a7b147806e852e2090eeda6e4e38f7d3f52b52 in GLib
+ * for more details. */
+ wrong_http_uri_events = "rRcr";
+ }
do_one_connection_connect_fail_test (session, wrong_http_uri,
G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED,
- "rRcr"); /* FIXME: why r again? GLib bug? */
+ wrong_http_uri_events);
proxy_uri = soup_uri_new (HTTP_PROXY);
g_object_set (G_OBJECT (session),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]