From cab3b17292c0803e013bad6d2df80a0a9cd29258 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 23 Oct 2017 10:08:32 +0200 Subject: [PATCH] Revert "ae: fix typo in constructor name" This reverts commit e88f49e2ccc79f77b5395de28d8fbdfc6eeb36f6. --- agent/ae/ae.go | 2 +- agent/ae/ae_test.go | 6 +++--- agent/agent.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/agent/ae/ae.go b/agent/ae/ae.go index 6d6735b413..36950df6b0 100644 --- a/agent/ae/ae.go +++ b/agent/ae/ae.go @@ -99,7 +99,7 @@ const ( retryFailIntv = 15 * time.Second ) -func NewStateSyncer(state State, intv time.Duration, shutdownCh chan struct{}, logger *log.Logger) *StateSyncer { +func NewStateSyner(state State, intv time.Duration, shutdownCh chan struct{}, logger *log.Logger) *StateSyncer { s := &StateSyncer{ State: state, Interval: intv, diff --git a/agent/ae/ae_test.go b/agent/ae/ae_test.go index d544c135cf..2b61c9a33a 100644 --- a/agent/ae/ae_test.go +++ b/agent/ae/ae_test.go @@ -29,7 +29,7 @@ func TestAE_scaleFactor(t *testing.T) { func TestAE_Pause_nestedPauseResume(t *testing.T) { t.Parallel() - l := NewStateSyncer(nil, 0, nil, nil) + l := NewStateSyner(nil, 0, nil, nil) if l.Paused() != false { t.Fatal("syncer should be unPaused after init") } @@ -60,7 +60,7 @@ func TestAE_Pause_nestedPauseResume(t *testing.T) { } func TestAE_Pause_ResumeTriggersSyncChanges(t *testing.T) { - l := NewStateSyncer(nil, 0, nil, nil) + l := NewStateSyner(nil, 0, nil, nil) l.Pause() l.Resume() select { @@ -74,7 +74,7 @@ func TestAE_Pause_ResumeTriggersSyncChanges(t *testing.T) { } func TestAE_Pause_ifNotPausedRun(t *testing.T) { - l := NewStateSyncer(nil, 0, nil, nil) + l := NewStateSyner(nil, 0, nil, nil) errCalled := errors.New("f called") f := func() error { return errCalled } diff --git a/agent/agent.go b/agent/agent.go index f40a027448..d08307609d 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -268,7 +268,7 @@ func (a *Agent) Start() error { // create the state synchronization manager which performs // regular and on-demand state synchronizations (anti-entropy). - a.sync = ae.NewStateSyncer(a.State, c.AEInterval, a.shutdownCh, a.logger) + a.sync = ae.NewStateSyner(a.State, c.AEInterval, a.shutdownCh, a.logger) // create the config for the rpc server/client consulCfg, err := a.consulConfig()