Merge pull request #15623 from wojtek-t/always_delete_namespace

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-10-14 08:35:24 -07:00
commit 6a4b76f34c
2 changed files with 8 additions and 4 deletions

View File

@ -122,6 +122,10 @@ var _ = Describe("Density", func() {
}) })
AfterEach(func() { AfterEach(func() {
// We can't call it explicitly at the end, because it will not be called
// if Expect() fails.
defer framework.afterEach()
// Remove any remaining pods from this test if the // Remove any remaining pods from this test if the
// replication controller still exists and the replica count // replication controller still exists and the replica count
// isn't 0. This means the controller wasn't cleaned up // isn't 0. This means the controller wasn't cleaned up
@ -146,8 +150,6 @@ var _ = Describe("Density", func() {
highLatencyRequests, err := HighLatencyRequests(c, 3*time.Second) highLatencyRequests, err := HighLatencyRequests(c, 3*time.Second)
expectNoError(err) expectNoError(err)
Expect(highLatencyRequests).NotTo(BeNumerically(">", 0), "There should be no high-latency requests") Expect(highLatencyRequests).NotTo(BeNumerically(">", 0), "There should be no high-latency requests")
framework.afterEach()
}) })
// Tests with "Skipped" substring in their name will be skipped when running // Tests with "Skipped" substring in their name will be skipped when running

View File

@ -74,14 +74,16 @@ var _ = Describe("Load capacity", func() {
// TODO add flag that allows to skip cleanup on failure // TODO add flag that allows to skip cleanup on failure
AfterEach(func() { AfterEach(func() {
// We can't call it explicitly at the end, because it will not be called
// if Expect() fails.
defer framework.afterEach()
deleteAllRC(configs) deleteAllRC(configs)
// Verify latency metrics // Verify latency metrics
highLatencyRequests, err := HighLatencyRequests(c, 3*time.Second) highLatencyRequests, err := HighLatencyRequests(c, 3*time.Second)
expectNoError(err, "Too many instances metrics above the threshold") expectNoError(err, "Too many instances metrics above the threshold")
Expect(highLatencyRequests).NotTo(BeNumerically(">", 0)) Expect(highLatencyRequests).NotTo(BeNumerically(">", 0))
framework.afterEach()
}) })
type Load struct { type Load struct {