mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
app/{vminsert,vmselect}: speed up TestInitStopNodes()
This commit is contained in:
parent
a13d21513e
commit
3a25a4b1de
@ -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()
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user