@@ -6,13 +6,12 @@ import (
66 "sync"
77 "testing"
88
9- "github.com/stretchr/testify/require"
10- "google.golang.org/protobuf/proto"
11-
129 "github.com/bootjp/elastickv/distribution"
1310 "github.com/bootjp/elastickv/internal/raftengine"
1411 pb "github.com/bootjp/elastickv/proto"
1512 "github.com/bootjp/elastickv/store"
13+ "github.com/stretchr/testify/require"
14+ "google.golang.org/protobuf/proto"
1615)
1716
1817type recordingTransactional struct {
@@ -383,11 +382,11 @@ type noopEngine struct{}
383382func (noopEngine ) Propose (_ context.Context , _ []byte ) (* raftengine.ProposalResult , error ) {
384383 return & raftengine.ProposalResult {}, nil
385384}
386- func (noopEngine ) State () raftengine.State { return raftengine .StateLeader }
387- func (noopEngine ) Leader () raftengine.LeaderInfo { return raftengine.LeaderInfo {} }
388- func (noopEngine ) VerifyLeader (_ context.Context ) error { return nil }
389- func (noopEngine ) LinearizableRead (_ context.Context ) (uint64 , error ) { return 0 , nil }
390- func (noopEngine ) Status () raftengine.Status { return raftengine.Status {} }
385+ func (noopEngine ) State () raftengine.State { return raftengine .StateLeader }
386+ func (noopEngine ) Leader () raftengine.LeaderInfo { return raftengine.LeaderInfo {} }
387+ func (noopEngine ) VerifyLeader (_ context.Context ) error { return nil }
388+ func (noopEngine ) LinearizableRead (_ context.Context ) (uint64 , error ) { return 0 , nil }
389+ func (noopEngine ) Status () raftengine.Status { return raftengine.Status {} }
391390func (noopEngine ) Configuration (_ context.Context ) (raftengine.Configuration , error ) {
392391 return raftengine.Configuration {}, nil
393392}
@@ -498,7 +497,7 @@ func TestShardedCoordinatorDispatchTxn_ReadKeysRoutedToPrepareByShard(t *testing
498497
499498 engine := distribution .NewEngine ()
500499 engine .UpdateRoute ([]byte ("a" ), []byte ("m" ), 1 ) // shard 1: a-m
501- engine .UpdateRoute ([]byte ("m" ), nil , 2 ) // shard 2: m+
500+ engine .UpdateRoute ([]byte ("m" ), nil , 2 ) // shard 2: m+
502501
503502 g1Txn := & recordingTransactional {}
504503 g2Txn := & recordingTransactional {}
0 commit comments