From 3c245b8d1d31fa44cd4b08ddf16695c4d2950ed8 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kraus Date: Wed, 22 Dec 2021 11:06:16 +0100 Subject: [PATCH] Fix existing tests for log streaming --- client/fs_endpoint.go | 1 - client/fs_endpoint_test.go | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/fs_endpoint.go b/client/fs_endpoint.go index de349b3b7ee..c4e18ad9488 100644 --- a/client/fs_endpoint.go +++ b/client/fs_endpoint.go @@ -826,7 +826,6 @@ func blockUntilNextLog(ctx context.Context, fs allocdir.AllocDirFS, logPath, tas // waiting for. for _, entry := range indexes { if entry.idx >= nextIndex { - //<-time.NewTicker(5 * time.Second).C next <- nil close(next) return diff --git a/client/fs_endpoint_test.go b/client/fs_endpoint_test.go index fa650df2767..a3ab3a442dd 100644 --- a/client/fs_endpoint_test.go +++ b/client/fs_endpoint_test.go @@ -1568,7 +1568,7 @@ func TestFS_streamFile_NoFile(t *testing.T) { defer framer.Destroy() err := c.endpoints.FileSystem.streamFile( - context.Background(), 0, "foo", 0, ad, framer, nil) + context.Background(), 0, "foo", 0, ad, framer, nil, nil) require.Error(t, err) if runtime.GOOS == "windows" { require.Contains(t, err.Error(), "cannot find the file") @@ -1629,7 +1629,7 @@ func TestFS_streamFile_Modify(t *testing.T) { // Start streaming go func() { if err := c.endpoints.FileSystem.streamFile( - context.Background(), 0, streamFile, 0, ad, framer, nil); err != nil { + context.Background(), 0, streamFile, 0, ad, framer, nil, nil); err != nil { t.Fatalf("stream() failed: %v", err) } }() @@ -1704,7 +1704,7 @@ func TestFS_streamFile_Truncate(t *testing.T) { // Start streaming go func() { if err := c.endpoints.FileSystem.streamFile( - context.Background(), 0, streamFile, 0, ad, framer, nil); err != nil { + context.Background(), 0, streamFile, 0, ad, framer, nil, nil); err != nil { t.Fatalf("stream() failed: %v", err) } }() @@ -1808,7 +1808,7 @@ func TestFS_streamImpl_Delete(t *testing.T) { // Start streaming go func() { if err := c.endpoints.FileSystem.streamFile( - context.Background(), 0, streamFile, 0, ad, framer, nil); err != nil { + context.Background(), 0, streamFile, 0, ad, framer, nil, nil); err != nil { t.Fatalf("stream() failed: %v", err) } }()