Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmd/sop-daemon/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestMain(m *testing.M) {
time.Sleep(time.Minute)
os.Exit(0)
case "sleep":
time.Sleep(20 * time.Second)
time.Sleep(2 * time.Second)
os.Exit(0)
}
os.Exit(m.Run())
Expand Down Expand Up @@ -229,6 +229,9 @@ func Test_TokenIsNotPassedToCommands(t *testing.T) {
func Test_TimeoutReturnsEvenIfAChildHoldsTheOutputOpen(t *testing.T) {
cfg := testConfig(t)
cfg.commandTimeout = 300 * time.Millisecond
// The orphaned helper outlives the request. On Windows go test cannot delete
// the test binary while any copy of it is running, so wait for it to exit.
t.Cleanup(func() { time.Sleep(3 * time.Second) })
start := time.Now()
resp := postExec(t, cfg, map[string]string{"SOP_DAEMON_TEST_HELPER": "orphan"})
if elapsed := time.Since(start); elapsed > 8*time.Second {
Expand Down
Loading