disable most flaky test in CI (refs #16338) (#17113)

This commit is contained in:
Timothee Cour 2021-03-10 19:08:27 -08:00 • committed by GitHub
commit 789cc49b60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@
## for a comparison with other clients. ## for a comparison with other clients.
from stdtest/testutils import enableRemoteNetworking from stdtest/testutils import enableRemoteNetworking
when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(windows) and not defined(openbsd) and not defined(i386)): when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(windows) and not defined(openbsd)):
# Not supported on Windows due to old openssl version # Not supported on Windows due to old openssl version
import import
httpclient, httpclient,
@ -95,7 +95,7 @@ when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(win
template evaluate(exception_msg: string, category: Category, desc: string) = template evaluate(exception_msg: string, category: Category, desc: string) =
# Evaluate test outcome. Testes flagged as _broken are evaluated and skipped # Evaluate test outcome. Tests flagged as `_broken` are evaluated and skipped
let raised = (exception_msg.len > 0) let raised = (exception_msg.len > 0)
let should_not_raise = category in {good, dubious_broken, bad_broken} let should_not_raise = category in {good, dubious_broken, bad_broken}
if should_not_raise xor raised: if should_not_raise xor raised:
@ -161,7 +161,7 @@ when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(win
suite "SSL certificate check - httpclient - threaded": suite "SSL certificate check - httpclient - threaded":
when defined(nimTestsEnableFlaky) or not defined(linux): # xxx pending bug #16338
# Spawn threads before the "test" blocks # Spawn threads before the "test" blocks
var outcomes = newSeq[FlowVar[TTOutcome]](certificate_tests.len) var outcomes = newSeq[FlowVar[TTOutcome]](certificate_tests.len)
for i, ct in certificate_tests: for i, ct in certificate_tests:
@ -171,11 +171,10 @@ when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(win
# create "test" blocks and handle thread outputs # create "test" blocks and handle thread outputs
for t in outcomes: for t in outcomes:
let outcome = ^t # wait for a thread to terminate let outcome = ^t # wait for a thread to terminate
test outcome.desc: test outcome.desc:
evaluate(outcome.exception_msg, outcome.category, outcome.desc) evaluate(outcome.exception_msg, outcome.category, outcome.desc)
else:
echo "skipped test"
# net tests # net tests