Skip to content

Commit ad266c2

Browse files
committed
Merge pull request #12 from cloudfoundry-incubator/fix-metrics-tests
adds AfterEach to stop the reporter
2 parents e26be6a + 61eb998 commit ad266c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

depot/metrics/reporter_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package metrics_test
22

33
import (
44
"errors"
5+
"os"
56
"time"
67

78
. "github.com/onsi/ginkgo"
@@ -61,6 +62,11 @@ var _ = Describe("Reporter", func() {
6162
})
6263
})
6364

65+
AfterEach(func() {
66+
reporter.Signal(os.Interrupt)
67+
Eventually(reporter.Wait()).Should(Receive())
68+
})
69+
6470
It("reports the current capacity on the given interval", func() {
6571
Eventually(func() fake.Metric {
6672
return sender.GetValue("CapacityTotalMemory")

0 commit comments

Comments
 (0)