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:
Daniel Nelson 2017-03-28 12:31:36 -07:00
parent 1100a98f11
commit 9e036b2d65
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 0 additions and 11 deletions

View File

@ -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)