mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-20 03:47:54 +02:00
More debugging info for the time out in zsh background saving tests
This commit is contained in:
parent
bf6d12e4cd
commit
907da9bf47
@ -793,7 +793,9 @@ func getPidofCommand() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func waitForBackgroundSavesToComplete(t *testing.T) {
|
func waitForBackgroundSavesToComplete(t *testing.T) {
|
||||||
for i := 0; i < 30; i++ {
|
lastOut := ""
|
||||||
|
lastErr := ""
|
||||||
|
for i := 0; i < 20; i++ {
|
||||||
cmd := exec.Command(getPidofCommand(), "hishtory")
|
cmd := exec.Command(getPidofCommand(), "hishtory")
|
||||||
var stdout bytes.Buffer
|
var stdout bytes.Buffer
|
||||||
var stderr bytes.Buffer
|
var stderr bytes.Buffer
|
||||||
@ -808,9 +810,11 @@ func waitForBackgroundSavesToComplete(t *testing.T) {
|
|||||||
time.Sleep(1000 * time.Millisecond)
|
time.Sleep(1000 * time.Millisecond)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
lastOut = stdout.String()
|
||||||
|
lastErr = stdout.String()
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
}
|
}
|
||||||
t.Fatalf("failed to wait until hishtory wasn't running")
|
t.Fatalf("failed to wait until hishtory wasn't running (lastOut=%#v, lastErr=%#v)", lastOut, lastErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func hishtoryQuery(t *testing.T, tester shellTester, query string) string {
|
func hishtoryQuery(t *testing.T, tester shellTester, query string) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user