Skip to content

Commit 8a3f6e2

Browse files
committed
WIP
1 parent 593a891 commit 8a3f6e2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cli/list_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@ func TestList(t *testing.T) {
4141
pty.ExpectMatch("Started")
4242
cancelFunc()
4343
<-done
44+
t.Cleanup(func() {
45+
t.Fatalf("XYZ")
46+
})
4447
})
4548
}

pty/ptytest/ptytest.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func create(t *testing.T, ptty pty.PTY, name string) *PTY {
4747
logDone := make(chan struct{})
4848
logr, logw := io.Pipe()
4949
t.Cleanup(func() {
50-
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
50+
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
5151
defer cancel()
5252

5353
_ = logw.Close()
@@ -69,7 +69,7 @@ func create(t *testing.T, ptty pty.PTY, name string) *PTY {
6969
_ = out.closeErr(err)
7070
}()
7171
t.Cleanup(func() {
72-
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
72+
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
7373
defer cancel()
7474

7575
// Close pty only so that the copy goroutine can consume the
@@ -202,7 +202,7 @@ func logf(t *testing.T, name, format string, args ...interface{}) {
202202
func fatalf(t *testing.T, name, reason, format string, args ...interface{}) {
203203
t.Helper()
204204

205-
t.Fatal(fmt.Sprintf("%s: %s %s", name, reason, fmt.Sprintf(format, args...)))
205+
t.Fatalf("%s: %s %s", name, reason, fmt.Sprintf(format, args...))
206206
}
207207

208208
// stdbuf is like a buffered stdout, it buffers writes until read.

0 commit comments

Comments
 (0)