@@ -493,10 +493,7 @@ func TestAddMutation_mrjn1(t *testing.T) {
493493func  TestReadSingleValue (t  * testing.T ) {
494494	defer  setMaxListSize (maxListSize )
495495	maxListSize  =  math .MaxInt32 
496- << << << <  HEAD 
497496	require .Equal (t , nil , pstore .DropAll ())
498- == == == = 
499- >> >> >> >  6 fbd525d2  (Use  get  batch  api  badger )
500497
501498	// We call pl.Iterate and then stop iterating in the first loop when we are reading 
502499	// single values. This test confirms that the two functions, getFirst from this file 
@@ -505,7 +502,6 @@ func TestReadSingleValue(t *testing.T) {
505502	key  :=  x .DataKey (x .GalaxyAttr ("value" ), 1240 )
506503	ol , err  :=  getNew (key , ps , math .MaxUint64 )
507504	require .NoError (t , err )
508- << << << <  HEAD 
509505	N  :=  uint64 (10000 )
510506	for  i  :=  uint64 (2 ); i  <=  N ; i  +=  2  {
511507		edge  :=  & pb.DirectedEdge {
@@ -518,19 +514,6 @@ func TestReadSingleValue(t *testing.T) {
518514		kData  :=  ol .getMutation (i  +  1 )
519515		writer  :=  NewTxnWriter (pstore )
520516		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 )
534517			require .NoError (t , err )
535518		}
536519		writer .Flush ()
@@ -540,16 +523,12 @@ func TestReadSingleValue(t *testing.T) {
540523			kvs , err  :=  ol .Rollup (nil , txn .StartTs - 3 )
541524			require .NoError (t , err )
542525			require .NoError (t , writePostingListToDisk (kvs ))
543- << << << <  HEAD 
544526			// Delete item from global cache before reading, as we are not updating the cache in the test 
545527			memoryLayer .del (key )
546- == == == = 
547- >> >> >> >  6 fbd525d2  (Use  get  batch  api  badger )
548528			ol , err  =  getNew (key , ps , math .MaxUint64 )
549529			require .NoError (t , err )
550530		}
551531
552- << << << <  HEAD 
553532		j  :=  uint64 (3 )
554533		if  j  <  ol .minTs  {
555534			j  =  ol .minTs 
@@ -559,17 +538,6 @@ func TestReadSingleValue(t *testing.T) {
559538			k , err  :=  tx .cache .GetSinglePosting (key )
560539			require .NoError (t , err )
561540			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 )
573541		}
574542	}
575543}
0 commit comments