diff --git a/app/vminsert/netstorage/netstorage_test.go b/app/vminsert/netstorage/netstorage_test.go index 278ee84686..0a3ce9e38d 100644 --- a/app/vminsert/netstorage/netstorage_test.go +++ b/app/vminsert/netstorage/netstorage_test.go @@ -11,4 +11,18 @@ func TestInitStopNodes(t *testing.T) { runtime.Gosched() 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() + } } diff --git a/app/vmselect/netstorage/netstorage_test.go b/app/vmselect/netstorage/netstorage_test.go index 8a2a0cee27..19d05060e6 100644 --- a/app/vmselect/netstorage/netstorage_test.go +++ b/app/vmselect/netstorage/netstorage_test.go @@ -12,6 +12,20 @@ func TestInitStopNodes(t *testing.T) { runtime.Gosched() 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) {