fix up travis test failure via race condition

This commit is contained in:
Chelsea Holland Komlo 2017-09-05 14:27:28 +00:00
parent a8cbd0b559
commit dea1fa089b
1 changed files with 4 additions and 0 deletions

View File

@ -148,6 +148,10 @@ func TestClient_BaseLabels(t *testing.T) {
t.Fatalf("err: %v", err)
}
// directly invoke this function, as otherwise this will fail on a CI build
// due to a race condition
client.emitStats()
baseLabels := client.baseLabels
assert.NotEqual(0, len(baseLabels))