mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-09 23:26:24 -04:00
Increase integration test timeout to 30 minutes
Go's default 10-minute timeout was enough for running integration tests normally (both locally and on CI), but with race detection turned on they can take much longer to run. Increase the timeout unconditionally to 30 minutes; we don't bother making a distinction between race vs. normal, because a longer timeout doesn't hurt (I can't recall having hit the global timeout ever; and we still have the per-test watchdog that kills an individual test after 40s).
This commit is contained in:
parent
7fce58b09b
commit
334daccfab
2
justfile
2
justfile
|
|
@ -40,7 +40,7 @@ lint:
|
|||
./scripts/gofumpt-check.sh
|
||||
./scripts/golangci-lint-shim.sh run
|
||||
|
||||
e2e-test-command := "go test pkg/integration/clients/*.go"
|
||||
e2e-test-command := "go test -timeout 30m pkg/integration/clients/*.go"
|
||||
|
||||
# Run integration tests headlessly: no args runs all tests, a test name (or path) runs just that one. Use e2e-cli for a visible UI.
|
||||
e2e *args:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ if [ -n "$LAZYGIT_GOCOVERDIR" ]; then
|
|||
# hacky. To capture the coverage data for the test runner we pass the test.gocoverdir positional
|
||||
# arg, but if we do that then the GOCOVERDIR env var (which you typically pass to the test binary) will be overwritten by the test runner. So we're passing LAZYGIT_COCOVERDIR instead
|
||||
# and then internally passing that to the test binary as GOCOVERDIR.
|
||||
go test -cover -coverpkg=github.com/jesseduffield/lazygit/pkg/... pkg/integration/clients/*.go -args -test.gocoverdir="/tmp/code_coverage"
|
||||
go test -timeout 30m -cover -coverpkg=github.com/jesseduffield/lazygit/pkg/... pkg/integration/clients/*.go -args -test.gocoverdir="/tmp/code_coverage"
|
||||
EXITCODE=$?
|
||||
|
||||
# We're merging the coverage data for the sake of having fewer artefacts to upload.
|
||||
|
|
@ -29,7 +29,7 @@ if [ -n "$LAZYGIT_GOCOVERDIR" ]; then
|
|||
rm -rf /tmp/code_coverage
|
||||
mv /tmp/code_coverage_merged /tmp/code_coverage
|
||||
else
|
||||
go test pkg/integration/clients/*.go
|
||||
go test -timeout 30m pkg/integration/clients/*.go
|
||||
EXITCODE=$?
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue