Skip to content

Commit

Permalink
dumb unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
thorfour committed Oct 3, 2024
1 parent 624d2bb commit 15d8bf6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions reporter/offline_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package reporter

import (
"errors"
"io"
"os"
"testing"

"github.com/apache/arrow/go/v16/arrow/ipc"
"github.com/stretchr/testify/require"
)

func Test_Offline_ReadFile(t *testing.T) {
f, err := os.Open("/tmp/offline-data/019251da-d851-7cee-a4dd-385102cb1d9a.ipc")
require.NoError(t, err)

reader, err := ipc.NewReader(f)
require.NoError(t, err)

for {
batch, err := reader.Read()
if errors.Is(err, io.EOF) {
break
}
require.NoError(t, err)
t.Log(batch)
}
}

0 comments on commit 15d8bf6

Please sign in to comment.