summary refs log tree commit diff stats
path: root/tests/untestable
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-03-23 00:30:41 -0700
committerGitHub <noreply@github.com>2021-03-23 08:30:41 +0100
commitb50776dd2facae166eb9d1bdbcff205c01adc25b (patch)
treea892bb6f40009abbd799013736a87b1f4d2c55d0 /tests/untestable
parent4f9aaee1d9a30976e4ca9bff6fb428960a6b92b0 (diff)
downloadNim-b50776dd2facae166eb9d1bdbcff205c01adc25b.tar.gz
refs #16338 make thttpclient_ssl_remotenetwork.nim less flaky (#17457)
Diffstat (limited to 'tests/untestable')
-rw-r--r--tests/untestable/thttpclient_ssl_remotenetwork.nim17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/untestable/thttpclient_ssl_remotenetwork.nim b/tests/untestable/thttpclient_ssl_remotenetwork.nim
index eea65bf0b..f56fe274b 100644
--- a/tests/untestable/thttpclient_ssl_remotenetwork.nim
+++ b/tests/untestable/thttpclient_ssl_remotenetwork.nim
@@ -115,12 +115,23 @@ when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(win
 
     else:
       # this is unexpected
+      var fatal = true
+      var msg = ""
       if raised:
-        echo "         $# ($#) raised: $#" % [desc, $category, exception_msg]
+        msg = "         $# ($#) raised: $#" % [desc, $category, exception_msg]
+        if "500 Internal Server Error" in exception_msg:
+          # refs https://github.com/nim-lang/Nim/issues/16338#issuecomment-804300278
+          # we got: `good (good) raised: 500 Internal Server Error`
+          fatal = false
+          msg.add " (http 500 => assuming this is not our problem)"
       else:
-        echo "         $# ($#) did not raise" % [desc, $category]
-      if category in {good, dubious, bad}:
+        msg = "         $# ($#) did not raise" % [desc, $category]
+
+      if category in {good, dubious, bad} and fatal:
+        echo "D20210322T121353: error: " & msg
         fail()
+      else:
+        echo "D20210322T121353: warning: " & msg
 
 
   suite "SSL certificate check - httpclient":