Remove wait loop in riemann tests
This testcase still has a race condition but I believe it is when the test does not complete quickly enough.
This commit is contained in:
parent
c772d0a398
commit
d4011169df
|
@ -193,17 +193,6 @@ func TestConnectAndWrite(t *testing.T) {
|
||||||
err = r.Write(metrics)
|
err = r.Write(metrics)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
start := time.Now()
|
|
||||||
for true {
|
|
||||||
events, _ := r.client.Query(`tagged "docker"`)
|
|
||||||
if len(events) > 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if time.Since(start) > time.Second {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// are there any "docker" tagged events in Riemann?
|
// are there any "docker" tagged events in Riemann?
|
||||||
events, err := r.client.Query(`tagged "docker"`)
|
events, err := r.client.Query(`tagged "docker"`)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
Loading…
Reference in New Issue