[glib-networking/mcatanzaro/session-resumption] Improve reliability of client auth failure test



commit c239507411f9cd617e0457bf7abee841c1f4f38b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Oct 6 20:29:59 2019 -0500

    Improve reliability of client auth failure test

 tls/tests/connection.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index eed4785..095f88f 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -1114,7 +1114,12 @@ test_client_auth_failure (TestConnection *test,
   g_main_loop_run (test->loop);
   wait_until_server_finished (test);
 
-  g_assert_error (test->read_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED);
+  /* FIXME: Too many possible timing-dependent errors here. */
+  if (!g_error_matches (test->read_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS) &&
+      !g_error_matches (test->read_error, G_TLS_ERROR, G_TLS_ERROR_EOF))
+    {
+      g_assert_error (test->read_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED);
+    }
   g_assert_error (test->server_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED);
 
   g_assert_true (accepted_changed);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]