From 3d202b59bce3c1d8e6d7cf5131a7a384a419571a Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 23 Oct 2017 10:08:33 +0200 Subject: [PATCH] Revert "ae: add test for ifNotPausedRun" This reverts commit f5177ef332b8396aea368b7dea18a976e029a54f. --- agent/ae/ae_test.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/agent/ae/ae_test.go b/agent/ae/ae_test.go index 5004353590..3d3449d8b1 100644 --- a/agent/ae/ae_test.go +++ b/agent/ae/ae_test.go @@ -1,9 +1,7 @@ package ae import ( - "errors" "fmt" - "reflect" "testing" ) @@ -58,22 +56,3 @@ func TestAE_nestedPauseResume(t *testing.T) { }() l.Resume() } - -func TestAE_ifNotPausedRun(t *testing.T) { - l := NewStateSyner(nil, 0, nil, nil) - - errCalled := errors.New("f called") - f := func() error { return errCalled } - - l.Pause() - err := l.ifNotPausedRun(f) - if got, want := err, errPaused; !reflect.DeepEqual(got, want) { - t.Fatalf("got error %q want %q", got, want) - } - l.Resume() - - err = l.ifNotPausedRun(f) - if got, want := err, errCalled; got != want { - t.Fatalf("got error %q want %q", got, want) - } -}