Skip to content

Commit

Permalink
Fix existing tests for log streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuss committed Dec 22, 2021
1 parent e6cc358 commit 3c245b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion client/fs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions client/fs_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
}
}()
Expand Down Expand Up @@ -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)
}
}()
Expand Down Expand Up @@ -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)
}
}()
Expand Down

0 comments on commit 3c245b8

Please sign in to comment.