summaryrefslogtreecommitdiffstats
path: root/pkg/gui/test_mode.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-09-11 21:28:31 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-09-28 10:03:53 +0200
commit40b8557608aa318aa15f4a8560e5648a2b5fd427 (patch)
tree2b469aa907458d2ea81f0ba0c7344dea18cf22d1 /pkg/gui/test_mode.go
parent92e107f52ddea709fa91ebb4ee1df304331cfc7a (diff)
Disable the 40-second timeout for integration tests when debugging
Pausing at breakpoints and stepping through code can often take longer than 40s, so the timeout is annoying when debugging.
Diffstat (limited to 'pkg/gui/test_mode.go')
-rw-r--r--pkg/gui/test_mode.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg/gui/test_mode.go b/pkg/gui/test_mode.go
index e24e922a9..151cb7246 100644
--- a/pkg/gui/test_mode.go
+++ b/pkg/gui/test_mode.go
@@ -45,10 +45,12 @@ func (gui *Gui) handleTestMode() {
log.Fatal("gocui should have already exited")
}()
- go utils.Safe(func() {
- time.Sleep(time.Second * 40)
- log.Fatal("40 seconds is up, lazygit recording took too long to complete")
- })
+ if os.Getenv(components.WAIT_FOR_DEBUGGER_ENV_VAR) == "" {
+ go utils.Safe(func() {
+ time.Sleep(time.Second * 40)
+ log.Fatal("40 seconds is up, lazygit recording took too long to complete")
+ })
+ }
}
}