From 3eb9aff216cdf7cc985fc158ded4e2ce34664bb8 Mon Sep 17 00:00:00 2001 From: zhangke Date: Tue, 17 May 2016 19:00:34 +0800 Subject: [PATCH] Update fake.go --- pkg/client/testing/core/fake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/testing/core/fake.go b/pkg/client/testing/core/fake.go index 8e54f4b62b9..751780b1d6a 100644 --- a/pkg/client/testing/core/fake.go +++ b/pkg/client/testing/core/fake.go @@ -179,7 +179,7 @@ func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper { // ClearActions clears the history of actions called on the fake client func (c *Fake) ClearActions() { c.Lock() - c.Unlock() + defer c.Unlock() c.actions = make([]Action, 0) }