Skip to content

Commit 57decd2

Browse files
authored
Test that a second batch commit does not error (#256)
1 parent 86fc4ef commit 57decd2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_util.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ func RunBatchTest(t *testing.T, ds dstore.Batching) {
5151
t.Fatal(err)
5252
}
5353

54+
// seecond commit should do nothing, but should not cause error
55+
err = batch.Commit(ctx)
56+
if err != nil {
57+
t.Fatal(err)
58+
}
59+
5460
for i, k := range keys {
5561
blk, err := ds.Get(ctx, k)
5662
if err != nil {

0 commit comments

Comments
 (0)