tests: make rspamd not block on dns queries
These will never suceed while running the tests in the Nix sandbox, and skipping them leads to very noticable (~51%) speedups. Before: ``` Benchmark 1: nix build .#hydraJobs.x86_64-linux.external-unstable --rebuild Time (mean ± σ): 151.737 s ± 1.074 s [User: 0.310 s, System: 0.289 s] Range (min … max): 150.321 s … 153.512 s 10 runs ``` After: ``` Benchmark 1: nix build .#hydraJobs.x86_64-linux.external-unstable --rebuild Time (mean ± σ): 74.010 s ± 0.746 s [User: 0.269 s, System: 0.266 s] Range (min … max): 72.814 s … 75.190 s 10 runs ```
This commit is contained in:
parent
f08ee8da38
commit
0774c93ae6
1 changed files with 9 additions and 0 deletions
|
@ -9,4 +9,13 @@
|
||||||
|
|
||||||
# Enable second CPU core
|
# Enable second CPU core
|
||||||
virtualisation.cores = lib.mkDefault 2;
|
virtualisation.cores = lib.mkDefault 2;
|
||||||
|
|
||||||
|
# Don't make tests block on DNS requests that will never succeed
|
||||||
|
services.rspamd.locals."options.inc".text = ''
|
||||||
|
dns {
|
||||||
|
nameservers = ["127.0.0.1"];
|
||||||
|
timeout = 0.0s;
|
||||||
|
retransmits = 0;
|
||||||
|
}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue