@@ -129,7 +129,7 @@ func testBatchBasics(t *testing.T, writeOnly bool, commit func(e Engine, b Batch
129
129
func TestBatchBasics (t * testing.T ) {
130
130
defer leaktest .AfterTest (t )()
131
131
testBatchBasics (t , false /* writeOnly */ , func (e Engine , b Batch ) error {
132
- return b .Commit ()
132
+ return b .Commit (false /* !sync */ )
133
133
})
134
134
}
135
135
@@ -231,14 +231,14 @@ func TestBatchRepr(t *testing.T) {
231
231
t .Fatalf ("expected %v, but found %v" , expOps , ops )
232
232
}
233
233
234
- return e .ApplyBatchRepr (repr )
234
+ return e .ApplyBatchRepr (repr , false /* !sync */ )
235
235
})
236
236
}
237
237
238
238
func TestWriteBatchBasics (t * testing.T ) {
239
239
defer leaktest .AfterTest (t )()
240
240
testBatchBasics (t , true /* writeOnly */ , func (e Engine , b Batch ) error {
241
- return b .Commit ()
241
+ return b .Commit (false /* !sync */ )
242
242
})
243
243
}
244
244
@@ -264,7 +264,7 @@ func TestApplyBatchRepr(t *testing.T) {
264
264
265
265
b2 := e .NewBatch ()
266
266
defer b2 .Close ()
267
- if err := b2 .ApplyBatchRepr (repr1 ); err != nil {
267
+ if err := b2 .ApplyBatchRepr (repr1 , false /* !sync */ ); err != nil {
268
268
t .Fatal (err )
269
269
}
270
270
repr2 := b2 .Repr ()
@@ -290,11 +290,11 @@ func TestApplyBatchRepr(t *testing.T) {
290
290
291
291
b4 := e .NewBatch ()
292
292
defer b4 .Close ()
293
- if err := b4 .ApplyBatchRepr (repr ); err != nil {
293
+ if err := b4 .ApplyBatchRepr (repr , false /* !sync */ ); err != nil {
294
294
t .Fatal (err )
295
295
}
296
296
// Intentionally don't call Repr() because the expected user wouldn't.
297
- if err := b4 .Commit (); err != nil {
297
+ if err := b4 .Commit (false /* !sync */ ); err != nil {
298
298
t .Fatal (err )
299
299
}
300
300
@@ -456,7 +456,7 @@ func TestBatchProto(t *testing.T) {
456
456
t .Fatalf ("expected GetProto to fail ok=%t: %s" , ok , err )
457
457
}
458
458
// Commit and verify the proto can be read directly from the engine.
459
- if err := b .Commit (); err != nil {
459
+ if err := b .Commit (false /* !sync */ ); err != nil {
460
460
t .Fatal (err )
461
461
}
462
462
if ok , _ , _ , err := e .GetProto (mvccKey ("proto" ), getVal ); ! ok || err != nil {
@@ -545,7 +545,7 @@ func TestBatchScan(t *testing.T) {
545
545
}
546
546
547
547
// Now, commit batch and re-scan using engine direct to compare results.
548
- if err := b .Commit (); err != nil {
548
+ if err := b .Commit (false /* !sync */ ); err != nil {
549
549
t .Fatal (err )
550
550
}
551
551
for i , scan := range scans {
@@ -912,7 +912,7 @@ func TestBatchDistinctPanics(t *testing.T) {
912
912
func () { _ = batch .Put (a , nil ) },
913
913
func () { _ = batch .Merge (a , nil ) },
914
914
func () { _ = batch .Clear (a ) },
915
- func () { _ = batch .ApplyBatchRepr (nil ) },
915
+ func () { _ = batch .ApplyBatchRepr (nil , false ) },
916
916
func () { _ , _ = batch .Get (a ) },
917
917
func () { _ , _ , _ , _ = batch .GetProto (a , nil ) },
918
918
func () { _ = batch .Iterate (a , a , nil ) },
0 commit comments