mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 10:57:51 +00:00
Skip longest tests when running -short
The cluster timeout/down tests are way more than half the total time for "go test", and are very unlikely to be of interest in regular usage, although they matter for CI. Skip them when doing short tests.
This commit is contained in:
parent
7a381f7eaf
commit
616ed39771
1 changed files with 6 additions and 2 deletions
|
|
@ -948,6 +948,9 @@ func TestCluster_confirmNodeDownUp(t *testing.T) {
|
|||
|
||||
}
|
||||
func TestCluster_confirmNodeDownTimeout(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip()
|
||||
}
|
||||
r := mux.NewRouter()
|
||||
r.HandleFunc("/version", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
time.Sleep(confirmDownSleep * time.Second * confirmDownRetries)
|
||||
|
|
@ -973,10 +976,12 @@ func TestCluster_confirmNodeDownTimeout(t *testing.T) {
|
|||
if !confirmNodeDown(uri, logger.NewVerboseLogger(os.Stdout)) {
|
||||
t.Errorf("expected node to be down")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestCluster_confirmNodeDownDown(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip()
|
||||
}
|
||||
uri := URI{}
|
||||
uri.Scheme = "http"
|
||||
uri.Host = "DoesntMatter"
|
||||
|
|
@ -985,5 +990,4 @@ func TestCluster_confirmNodeDownDown(t *testing.T) {
|
|||
if !confirmNodeDown(uri, logger.NewVerboseLogger(os.Stdout)) {
|
||||
t.Errorf("expected node to be down")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue