New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/etcd bootstrap #36
Conversation
@@ -104,7 +105,7 @@ func TestEtcdSDBootstrapServer(t *testing.T) { | |||
c, cli := helpers.GetTestEtcd(t) | |||
defer c.Terminate(t) | |||
e := getEtcdSD(t, config, table.server, cli) | |||
e.bootstrapLease() | |||
e.grantLease() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of e.grantLease
is not checked
@@ -129,7 +130,7 @@ func TestEtcdSDDeleteServer(t *testing.T) { | |||
c, cli := helpers.GetTestEtcd(t) | |||
defer c.Terminate(t) | |||
e := getEtcdSD(t, config, table.server, cli) | |||
e.bootstrapLease() | |||
e.grantLease() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of e.grantLease
is not checked
@@ -189,7 +190,7 @@ func TestEtcdSDGetServer(t *testing.T) { | |||
c, cli := helpers.GetTestEtcd(t) | |||
defer c.Terminate(t) | |||
e := getEtcdSD(t, config, table.server, cli) | |||
e.bootstrapLease() | |||
e.grantLease() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of e.grantLease
is not checked
syncServersInterval time.Duration | ||
heartbeatTTL time.Duration | ||
logHeartbeat bool | ||
lastHeartbeatTime time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastHeartbeatTime
is unused
Pull Request Test Coverage Report for Build 353
💛 - Coveralls |
72e6c86
to
6f5f8b3
Compare
@@ -130,7 +130,7 @@ func TestEtcdSDDeleteServer(t *testing.T) { | |||
c, cli := helpers.GetTestEtcd(t) | |||
defer c.Terminate(t) | |||
e := getEtcdSD(t, config, table.server, cli) | |||
e.bootstrapLease() | |||
e.grantLease() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of e.grantLease
is not checked
@@ -190,7 +190,7 @@ func TestEtcdSDGetServer(t *testing.T) { | |||
c, cli := helpers.GetTestEtcd(t) | |||
defer c.Terminate(t) | |||
e := getEtcdSD(t, config, table.server, cli) | |||
e.bootstrapLease() | |||
e.grantLease() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of e.grantLease
is not checked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Refactored the code to made it more clear when etcd was really starting or just trying to reconnect in order to attend to @andrehp suggestions in issue #34 .