1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-17 16:37:26 -04:00
hydra/t
Rick van Schijndel 578a3d2292 t: increase timeouts for slow commands with high load
We've seen many fails on ofborg, at lot of them ultimately appear to come down to
a timeout being hit, resulting in something like this:

Failure executing slapadd -F /<path>/slap.d -b dc=example -l /<path>/load.ldif.

Hopefully this resolves it for most cases.
I've done some endurance testing and this helps a lot.
some other commands also regularly time-out with high load:

- hydra-init
- hydra-create-user
- nix-store --delete

This should address most issues with tests randomly failing.

Used the following script for endurance testing:

```

import os
import subprocess

run_counter = 0
fail_counter = 0

while True:
    try:
        run_counter += 1
        print(f"Starting run {run_counter}")
        env = os.environ
        env["YATH_JOB_COUNT"] = "20"
        result = subprocess.run(["perl", "t/test.pl"], env=env)
        if (result.returncode != 0):
            fail_counter += 1
        print(f"Finish run {run_counter}, total fail count: {fail_counter}")
    except KeyboardInterrupt:
        print(f"Finished {run_counter} runs with {fail_counter} fails")
        break
```

In case someone else wants to do it on their system :).
Note that YATH_JOB_COUNT may need to be changed loosely based on your
cores.
I only have 4 cores (8 threads), so for others higher numbers might
yield better results in hashing out unstable tests.
2024-07-31 17:13:28 +02:00
..
content-addressed t: content-addressed: add a comment about a misleading testcase 2024-04-03 22:55:42 +02:00
evaluator feat(t/evaluator/evaluate-oom): comment intentions 2022-05-02 15:26:26 -04:00
Helper/AddBuilds AddBuilds: fix declarative jobsets with dynamic runcommand enabled 2022-06-30 01:49:30 +02:00
Hydra Relax time interval checks 2023-06-23 15:09:09 +02:00
input-types perlcritic: use strict, use warnings 2021-09-06 22:13:33 -04:00
jobs t: content-addressed: add test for caDependingOnFailingCA 2024-04-03 22:45:53 +02:00
lib t: increase timeouts for slow commands with high load 2024-07-31 17:13:28 +02:00
queue-runner t: increase timeouts for slow commands with high load 2024-07-31 17:13:28 +02:00
scripts t: increase timeouts for slow commands with high load 2024-07-31 17:13:28 +02:00
api-test.t api-test.t: don't print request content 2022-01-10 11:02:01 -05:00
build-products.t build-products: switch to makeAndEvaluateJobset 2021-12-14 20:32:13 -05:00
Makefile.am Start checking PRs with perlcritic 2021-08-20 11:06:43 -04:00
perlcritic.pl Start checking PRs with perlcritic 2021-08-20 11:06:43 -04:00
s3-backup-test.config tests: move to t, allow yath test from root 2021-03-05 09:49:06 -08:00
s3-backup-test.pl Switch to new Nix bindings, update Nix for that 2024-02-12 18:50:56 +01:00
setup-notifications-jobset.pl JSON -> JSON::MaybeXS 2021-12-13 15:37:56 -05:00
test.pl Update t/test.pl: fixup the list of env vars yath looks at for job count 2022-02-10 11:53:10 -05:00