Every test that starts a database hashed the bootstrap admin password with Argon2id at 64 MB, which under -race holds about 150 MB per hash, across dozens of parallel tests. HashPassword now hashes at 1 MB when testing.Testing() reports a test binary, so every test package gets the lower cost and a binary built by go build never does. One test still hashes and verifies through HashPassword at the shipped parameters, which are unchanged. script/test also runs at most four packages and eight parallel tests at once: unbounded, a many-core host linked and ran every test binary together. Model: opus-5-5
This commit is contained in:
+6
-1
@@ -22,6 +22,11 @@
|
||||
# The one figure above 90s is GOMAXPROCS 1, a synthetic core floor rather than
|
||||
# a condition CI runs under. If a CPU-limited runner ever puts a real run near
|
||||
# 67s, that is the datum to revisit the org figure with.
|
||||
#
|
||||
# -p 4 -parallel 8 keep the run under 2 GB of memory: at most four test
|
||||
# binaries build or run at once, each with at most eight parallel tests. Under
|
||||
# -race every test binary and every link costs a few hundred MB, so the
|
||||
# defaults (one per core) add up to several GB on a many-core host.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
@@ -29,7 +34,7 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
"$ROOT/script/assets"
|
||||
go test -v -race -timeout 90s ./...
|
||||
go test -v -race -p 4 -parallel 8 -timeout 90s ./...
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user