mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
don't run commands against holder before messing with its stats
You have to start the cluster before you can refer to its holders, because GetNode doesn't work on an unstarted cluster, but if you actually issue any commands, those require messing with the worker pool which wants to have access to the holder's stats.
This commit is contained in:
parent
01a0eb0d74
commit
3671129cd5
1 changed files with 4 additions and 3 deletions
|
|
@ -117,9 +117,6 @@ func TestStatsCount_Bitmap(t *testing.T) {
|
|||
c := test.MustRunUnsharedCluster(t, 1)
|
||||
defer c.Close()
|
||||
hldr := test.Holder{Holder: c.GetNode(0).Server.Holder()}
|
||||
|
||||
hldr.SetBit("d", "f", 0, 0)
|
||||
hldr.SetBit("d", "f", 0, 1)
|
||||
called := false
|
||||
hldr.Holder.Stats = &MockStats{
|
||||
mockCountWithTags: func(name string, value int64, rate float64, tags []string) {
|
||||
|
|
@ -134,6 +131,10 @@ func TestStatsCount_Bitmap(t *testing.T) {
|
|||
called = true
|
||||
},
|
||||
}
|
||||
|
||||
hldr.SetBit("d", "f", 0, 0)
|
||||
hldr.SetBit("d", "f", 0, 1)
|
||||
|
||||
if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: "d", Query: `Row(f=0)`}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue