Reset metrics in tests

This commit is contained in:
Wojciech Tyczynski
2015-06-23 11:36:03 +02:00
parent f4e7b5480d
commit 2a1834f7ed
3 changed files with 16 additions and 6 deletions

View File

@@ -73,6 +73,8 @@ var _ = Describe("Load capacity", func() {
nsForTesting, err := createTestingNS("load", c)
ns = nsForTesting.Name
expectNoError(err)
expectNoError(resetMetrics(c))
})
// TODO add flag that allows to skip cleanup on failure
@@ -85,7 +87,6 @@ var _ = Describe("Load capacity", func() {
}
// Verify latency metrics
// TODO: We should reset metrics before the test. Currently previous tests influence latency metrics.
highLatencyRequests, err := HighLatencyRequests(c, 1*time.Second, util.NewStringSet("events"))
expectNoError(err, "Too many instances metrics above the threshold")
Expect(highLatencyRequests).NotTo(BeNumerically(">", 0))