Skip to content

Commit

Permalink
disable most flaky test in CI (refs nim-lang#16338) (nim-lang#17113)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored and ardek66 committed Mar 26, 2021
1 parent 52fdac9 commit ca60072
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions tests/untestable/thttpclient_ssl_remotenetwork.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## for a comparison with other clients.

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
import
httpclient,
Expand Down Expand Up @@ -95,7 +95,7 @@ when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(win


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 should_not_raise = category in {good, dubious_broken, bad_broken}
if should_not_raise xor raised:
Expand Down Expand Up @@ -161,21 +161,20 @@ when enableRemoteNetworking and (defined(nimTestsEnableFlaky) or not defined(win


suite "SSL certificate check - httpclient - threaded":

# Spawn threads before the "test" blocks
var outcomes = newSeq[FlowVar[TTOutcome]](certificate_tests.len)
for i, ct in certificate_tests:
let t = spawn run_t_test(ct)
outcomes[i] = t

# create "test" blocks and handle thread outputs
for t in outcomes:
let outcome = ^t # wait for a thread to terminate

test outcome.desc:

evaluate(outcome.exception_msg, outcome.category, outcome.desc)

when defined(nimTestsEnableFlaky) or not defined(linux): # xxx pending bug #16338
# Spawn threads before the "test" blocks
var outcomes = newSeq[FlowVar[TTOutcome]](certificate_tests.len)
for i, ct in certificate_tests:
let t = spawn run_t_test(ct)
outcomes[i] = t

# create "test" blocks and handle thread outputs
for t in outcomes:
let outcome = ^t # wait for a thread to terminate
test outcome.desc:
evaluate(outcome.exception_msg, outcome.category, outcome.desc)
else:
echo "skipped test"

# net tests

Expand Down

0 comments on commit ca60072

Please sign in to comment.