File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -623,6 +623,8 @@ func TestClient_Stats(t *testing.T) {
623623 if err != nil {
624624 t .Fatalf ("Expected nil. Got: %v" , err )
625625 }
626+
627+ var totalByKeyCount int
626628 var total int
627629 for partID , part := range s .Partitions {
628630 total += part .TotalKeyCount
@@ -633,13 +635,17 @@ func TestClient_Stats(t *testing.T) {
633635 t .Fatalf ("Expected PreviosOwners list is empty. " +
634636 "Got: %v for PartID: %d" , part .PreviousOwners , partID )
635637 }
636- if part .KeyCount != 1 {
637- t .Fatalf ("Expected DMap count: 1 . Got: %d" , part .KeyCount )
638+ if part .KeyCount <= 0 {
639+ t .Fatalf ("Expected KeyCount is bigger than 0 . Got: %d" , part .KeyCount )
638640 }
641+ totalByKeyCount += part .KeyCount
639642 if part .Owner .String () != addr {
640643 t .Fatalf ("Expected partition owner: %s. Got: %s" , addr , part .Owner )
641644 }
642645 }
646+ if totalByKeyCount != 100 {
647+ t .Fatalf ("Expected total key count in stats is 100. Got: %d" , total )
648+ }
643649 if total != 100 {
644650 t .Fatalf ("Expected total key count in stats is 100. Got: %d" , total )
645651 }
You can’t perform that action at this time.
0 commit comments