Skip to content

Commit

Permalink
cluster: fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
  • Loading branch information
shafreeck committed Dec 5, 2019
1 parent 0e78e50 commit c767ec4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/cluster/cluster_stat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ func (s *testClusterStatSuite) TestStatEntriesAppend(c *C) {
N := 10
cst := NewStatEntries(N)
c.Assert(cst, NotNil)
ThreadsCollected = []string{"cpu:"}

// fill 2*N entries, 2 entries for each store
for i := 0; i < 2*N; i++ {
entry := &StatEntry{
StoreId: uint64(i % N),
CpuUsages: cpu(20),
}
cst.Append(entry)
c.Assert(cst.Append(entry), IsTrue)
}

// use i as the store ID
Expand Down

0 comments on commit c767ec4

Please sign in to comment.