Skip to content

Commit

Permalink
Fix race condition in Cache tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbrandhorst committed Mar 27, 2018
1 parent b4cc380 commit 1d21c43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion certify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ var _ = Describe("The Cache", func() {
defer GinkgoRecover()

Eventually(start).Should(BeClosed())
Expect(c.Cache.Delete(context.Background(), key)).To(Succeed())
Expect(c.Cache.Put(context.Background(), key, cert)).To(Succeed())
Expect(c.Cache.Get(context.Background(), key)).NotTo(BeNil())
}()
Expand All @@ -223,6 +222,8 @@ var _ = Describe("The Cache", func() {
// Synchronize goroutines
close(start)
wg.Wait()

Expect(c.Cache.Delete(context.Background(), key)).To(Succeed())
})
})
})
Expand Down

0 comments on commit 1d21c43

Please sign in to comment.