Compare commits

..
Author SHA1 Message Date
sneak c125375ac7 reputation: run the DNSBL resolver test in parallel (closes #406)
check / check (push) Failing after 4m2s
TestQueriesGoToTheResolverSWWDNSBLResolverNames queries a real UDP
stand-in outside any synctest bubble. A parallel test starts only once
every test that is not parallel has ended, so it can no longer overlap
the bubbled DNSBL tests, and no other parallel test of the package
queries a resolver.

The other tests that run one at a time stay so, each for the reason its
comment gives: environment variables, TMPDIR, timing, Go's resolver in
synctest bubbles, and garbage collection hiding a leaked connection.
Every subtest inside a parallel test already calls t.Parallel().

Model: opus-5-5
2026-11-17 05:32:01 +00:00
clawbot 8c9f20d346 waf: run the trap paths, rule files and Core Rule Set during the GeoJS wait (closes #405)
check / check (push) Failing after 1m51s
While the lookup waits for GeoJS, the trap paths, the rule files and the
Core Rule Set run at the same time as the checks after the lookup. The
first side to refuse answers the request; what the other side finds leaves
no trace. Those three checks have 500 ms together: past it, the request is
refused with 503 as checks_timed_out, with no ban and no offence.

Tests hold GeoJS and the Core Rule Set with stand-ins under synctest. The
test helper lifts the 500 ms limit for tests that run the real Core Rule
Set, which the race detector slows past it.

Model: opus-5-5
2026-11-17 06:11:52 +01:00
+8 -5
View File
@@ -31,10 +31,12 @@ import (
// this package: Go's resolver counts the queries under way in one // this package: Go's resolver counts the queries under way in one
// sync.WaitGroup for the whole process, and the process fails when // sync.WaitGroup for the whole process, and the process fails when
// queries from two bubbles, or from a bubble and from outside one, are // queries from two bubbles, or from a bubble and from outside one, are
// under way at once. TestMain has the resolver make its configuration, // under way at once. The one test outside a bubble is parallel, so it
// which it makes on its first query, outside every bubble, since the // starts only once every test that is not parallel has ended; no other
// configuration holds a channel, which the bubble it was made in would // parallel test of this package queries a resolver. TestMain has the
// keep to itself. // resolver make its configuration, which it makes on its first query,
// outside every bubble, since the configuration holds a channel, which
// the bubble it was made in would keep to itself.
const ( const (
// zone and otherZone are the DNSBL zones the tests name. // zone and otherZone are the DNSBL zones the tests name.
@@ -525,8 +527,9 @@ func TestAtMost100000VerdictsKeptTheOneFetchedLongestAgoDroppedFirst(
} }
} }
//nolint:paralleltest // one at a time, as the comment at the top of this file says
func TestQueriesGoToTheResolverSWWDNSBLResolverNames(t *testing.T) { func TestQueriesGoToTheResolverSWWDNSBLResolverNames(t *testing.T) {
t.Parallel()
resolver := &resolverStandIn{answers: map[string]answer{ resolver := &resolverStandIn{answers: map[string]answer{
listedName: {addrs: []string{listing}}, listedName: {addrs: []string{listing}},
}} }}