app/{vminsert,vmselect}: test initialization with different number of storage nodes

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3329
This commit is contained in:
Aliaksandr Valialkin 2022-11-09 11:48:34 +02:00
parent 8540dd669b
commit fe8d40f12c
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1
2 changed files with 28 additions and 0 deletions

View File

@ -11,4 +11,18 @@ func TestInitStopNodes(t *testing.T) {
runtime.Gosched() runtime.Gosched()
MustStop() MustStop()
} }
// Try initializing the netstorage with bigger number of nodes
for i := 0; i < 3; i++ {
Init([]string{"host1", "host2", "host3"}, 0)
runtime.Gosched()
MustStop()
}
// Try initializing the netstorage with smaller number of nodes
for i := 0; i < 3; i++ {
Init([]string{"host1"}, 0)
runtime.Gosched()
MustStop()
}
} }

View File

@ -12,6 +12,20 @@ func TestInitStopNodes(t *testing.T) {
runtime.Gosched() runtime.Gosched()
MustStop() MustStop()
} }
// Try initializing the netstorage with bigger number of nodes
for i := 0; i < 3; i++ {
Init([]string{"host1", "host2", "host3"})
runtime.Gosched()
MustStop()
}
// Try initializing the netstorage with smaller number of nodes
for i := 0; i < 3; i++ {
Init([]string{"host1"})
runtime.Gosched()
MustStop()
}
} }
func TestMergeSortBlocks(t *testing.T) { func TestMergeSortBlocks(t *testing.T) {