Skip to content

Commit

Permalink
Merge pull request #6774 from alrs/fix-client-test-goroutine
Browse files Browse the repository at this point in the history
client: fix use of T.Fatalf() in test goroutine
  • Loading branch information
schmichael authored Nov 26, 2019
2 parents f02f59d + 1c9a669 commit 830c0b1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions client/fs_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1884,13 +1884,14 @@ func TestFS_logsImpl_NoFollow(t *testing.T) {
}()

// Start streaming logs
go func() {
if err := c.endpoints.FileSystem.logsImpl(
context.Background(), false, false, 0,
OriginStart, task, logType, ad, frames); err != nil {
t.Fatalf("logs() failed: %v", err)
}
}()
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()

if err := c.endpoints.FileSystem.logsImpl(
ctx, false, false, 0,
OriginStart, task, logType, ad, frames); err != nil {
t.Fatalf("logsImpl failed: %v", err)
}

select {
case <-resultCh:
Expand Down

0 comments on commit 830c0b1

Please sign in to comment.