diff --git a/httpd/handler_test.go b/httpd/handler_test.go index 0f4d02e063..148537e82e 100644 --- a/httpd/handler_test.go +++ b/httpd/handler_test.go @@ -1170,6 +1170,8 @@ func TestHandler_serveWriteSeriesNonZeroTime(t *testing.T) { } time.Sleep(100 * time.Millisecond) // Ensure data node picks up write. + srvr.Restart() // Ensure data is queryable across restarts. + query := map[string]string{"db": "foo", "q": "select value from cpu"} status, body := MustHTTP("GET", s.URL+`/query`, query, nil, "") if status != http.StatusOK { @@ -1212,6 +1214,8 @@ func TestHandler_serveWriteSeriesZeroTime(t *testing.T) { } time.Sleep(100 * time.Millisecond) // Ensure data node picks up write. + srvr.Restart() // Ensure data is queryable across restarts. + query := map[string]string{"db": "foo", "q": "select value from cpu"} status, body := MustHTTP("GET", s.URL+`/query`, query, nil, "") @@ -1260,6 +1264,8 @@ func TestHandler_serveWriteSeriesStringValues(t *testing.T) { } time.Sleep(100 * time.Millisecond) // Ensure data node picks up write. + srvr.Restart() // Ensure data is queryable across restarts. + query := map[string]string{"db": "foo", "q": "select event from logs"} status, body := MustHTTP("GET", s.URL+`/query`, query, nil, "") if status != http.StatusOK { @@ -1301,6 +1307,8 @@ func TestHandler_serveWriteSeriesBoolValues(t *testing.T) { } time.Sleep(100 * time.Millisecond) // Ensure data node picks up write. + srvr.Restart() // Ensure data is queryable across restarts. + query := map[string]string{"db": "foo", "q": "select full from disk"} status, body := MustHTTP("GET", s.URL+`/query`, query, nil, "") if status != http.StatusOK {