app/{vminsert,vmselect}: speed up TestInitStopNodes()

This commit is contained in:
Aliaksandr Valialkin 2022-12-03 23:53:14 -08:00
parent a13d21513e
commit 3a25a4b1de
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1
2 changed files with 8 additions and 0 deletions

View File

@ -1,11 +1,15 @@
package netstorage
import (
"flag"
"runtime"
"testing"
)
func TestInitStopNodes(t *testing.T) {
if err := flag.Set("vmstorageDialTimeout", "1ms"); err != nil {
t.Fatalf("cannot set vmstorageDialTimeout flag: %s", err)
}
for i := 0; i < 3; i++ {
Init([]string{"host1", "host2"}, 0)
runtime.Gosched()

View File

@ -1,12 +1,16 @@
package netstorage
import (
"flag"
"reflect"
"runtime"
"testing"
)
func TestInitStopNodes(t *testing.T) {
if err := flag.Set("vmstorageDialTimeout", "1ms"); err != nil {
t.Fatalf("cannot set vmstorageDialTimeout flag: %s", err)
}
for i := 0; i < 3; i++ {
Init([]string{"host1", "host2"})
runtime.Gosched()