mirror of https://github.com/status-im/consul.git
ae: fix typo in constructor name
This commit is contained in:
parent
cd0262744d
commit
e88f49e2cc
|
@ -99,7 +99,7 @@ const (
|
||||||
retryFailIntv = 15 * time.Second
|
retryFailIntv = 15 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewStateSyner(state State, intv time.Duration, shutdownCh chan struct{}, logger *log.Logger) *StateSyncer {
|
func NewStateSyncer(state State, intv time.Duration, shutdownCh chan struct{}, logger *log.Logger) *StateSyncer {
|
||||||
s := &StateSyncer{
|
s := &StateSyncer{
|
||||||
State: state,
|
State: state,
|
||||||
Interval: intv,
|
Interval: intv,
|
||||||
|
|
|
@ -29,7 +29,7 @@ func TestAE_scaleFactor(t *testing.T) {
|
||||||
|
|
||||||
func TestAE_Pause_nestedPauseResume(t *testing.T) {
|
func TestAE_Pause_nestedPauseResume(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
l := NewStateSyner(nil, 0, nil, nil)
|
l := NewStateSyncer(nil, 0, nil, nil)
|
||||||
if l.Paused() != false {
|
if l.Paused() != false {
|
||||||
t.Fatal("syncer should be unPaused after init")
|
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) {
|
func TestAE_Pause_ResumeTriggersSyncChanges(t *testing.T) {
|
||||||
l := NewStateSyner(nil, 0, nil, nil)
|
l := NewStateSyncer(nil, 0, nil, nil)
|
||||||
l.Pause()
|
l.Pause()
|
||||||
l.Resume()
|
l.Resume()
|
||||||
select {
|
select {
|
||||||
|
@ -74,7 +74,7 @@ func TestAE_Pause_ResumeTriggersSyncChanges(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAE_Pause_ifNotPausedRun(t *testing.T) {
|
func TestAE_Pause_ifNotPausedRun(t *testing.T) {
|
||||||
l := NewStateSyner(nil, 0, nil, nil)
|
l := NewStateSyncer(nil, 0, nil, nil)
|
||||||
|
|
||||||
errCalled := errors.New("f called")
|
errCalled := errors.New("f called")
|
||||||
f := func() error { return errCalled }
|
f := func() error { return errCalled }
|
||||||
|
|
|
@ -268,7 +268,7 @@ func (a *Agent) Start() error {
|
||||||
|
|
||||||
// create the state synchronization manager which performs
|
// create the state synchronization manager which performs
|
||||||
// regular and on-demand state synchronizations (anti-entropy).
|
// regular and on-demand state synchronizations (anti-entropy).
|
||||||
a.sync = ae.NewStateSyner(a.State, c.AEInterval, a.shutdownCh, a.logger)
|
a.sync = ae.NewStateSyncer(a.State, c.AEInterval, a.shutdownCh, a.logger)
|
||||||
|
|
||||||
// create the config for the rpc server/client
|
// create the config for the rpc server/client
|
||||||
consulCfg, err := a.consulConfig()
|
consulCfg, err := a.consulConfig()
|
||||||
|
|
Loading…
Reference in New Issue