@@ -493,10 +493,7 @@ func TestAddMutation_mrjn1(t *testing.T) {
493
493
func TestReadSingleValue (t * testing.T ) {
494
494
defer setMaxListSize (maxListSize )
495
495
maxListSize = math .MaxInt32
496
- << << << < HEAD
497
496
require .Equal (t , nil , pstore .DropAll ())
498
- == == == =
499
- >> >> >> > 6 fbd525d2 (Use get batch api badger )
500
497
501
498
// We call pl.Iterate and then stop iterating in the first loop when we are reading
502
499
// single values. This test confirms that the two functions, getFirst from this file
@@ -505,7 +502,6 @@ func TestReadSingleValue(t *testing.T) {
505
502
key := x .DataKey (x .GalaxyAttr ("value" ), 1240 )
506
503
ol , err := getNew (key , ps , math .MaxUint64 )
507
504
require .NoError (t , err )
508
- << << << < HEAD
509
505
N := uint64 (10000 )
510
506
for i := uint64 (2 ); i <= N ; i += 2 {
511
507
edge := & pb.DirectedEdge {
@@ -518,19 +514,6 @@ func TestReadSingleValue(t *testing.T) {
518
514
kData := ol .getMutation (i + 1 )
519
515
writer := NewTxnWriter (pstore )
520
516
if err := writer .SetAt (key , kData , BitDeltaPosting , i + 1 ); err != nil {
521
- == == == =
522
- N := int (10000 )
523
- for i := 2 ; i <= N ; i += 2 {
524
- edge := & pb.DirectedEdge {
525
- Value : []byte ("ho hey there" + strconv .Itoa (i )),
526
- }
527
- txn := Txn {StartTs : uint64 (i )}
528
- addMutationHelper (t , ol , edge , Set , & txn )
529
- require .NoError (t , ol .commitMutation (uint64 (i ), uint64 (i )+ 1 ))
530
- kData := ol .getMutation (uint64 (i ))
531
- writer := NewTxnWriter (pstore )
532
- if err := writer .SetAt (key , kData , BitDeltaPosting , uint64 (i )); err != nil {
533
- >> >> >> > 6 fbd525d2 (Use get batch api badger )
534
517
require .NoError (t , err )
535
518
}
536
519
writer .Flush ()
@@ -540,16 +523,12 @@ func TestReadSingleValue(t *testing.T) {
540
523
kvs , err := ol .Rollup (nil , txn .StartTs - 3 )
541
524
require .NoError (t , err )
542
525
require .NoError (t , writePostingListToDisk (kvs ))
543
- << << << < HEAD
544
526
// Delete item from global cache before reading, as we are not updating the cache in the test
545
527
memoryLayer .del (key )
546
- == == == =
547
- >> >> >> > 6 fbd525d2 (Use get batch api badger )
548
528
ol , err = getNew (key , ps , math .MaxUint64 )
549
529
require .NoError (t , err )
550
530
}
551
531
552
- << << << < HEAD
553
532
j := uint64 (3 )
554
533
if j < ol .minTs {
555
534
j = ol .minTs
@@ -559,17 +538,6 @@ func TestReadSingleValue(t *testing.T) {
559
538
k , err := tx .cache .GetSinglePosting (key )
560
539
require .NoError (t , err )
561
540
checkValue (t , ol , string (k .Postings [0 ].Value ), j )
562
- == == == =
563
- j := 2
564
- if j < int (ol .minTs ) {
565
- j = int (ol .minTs )
566
- }
567
- for ; j < i + 6 ; j ++ {
568
- tx := NewTxn (uint64 (j ))
569
- k , err := tx .cache .GetSinglePosting (key )
570
- require .NoError (t , err )
571
- checkValue (t , ol , string (k .Postings [0 ].Value ), uint64 (j ))
572
- >> >> >> > 6 fbd525d2 (Use get batch api badger )
573
541
}
574
542
}
575
543
}
0 commit comments