Skip to content
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

Merged
merged 1 commit into from Aug 9, 2018
Merged

Refactor/etcd bootstrap #36

merged 1 commit into from Aug 9, 2018

Conversation

gabrielerzinger
Copy link
Contributor

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 .

@@ -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()
Copy link

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()
Copy link

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()
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastHeartbeatTime is unused

@coveralls
Copy link

coveralls commented Aug 8, 2018

Pull Request Test Coverage Report for Build 353

  • 45 of 66 (68.18%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 75.263%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cluster/etcd_service_discovery.go 42 63 66.67%
Totals Coverage Status
Change from base Build 351: -0.1%
Covered Lines: 3572
Relevant Lines: 4746

💛 - Coveralls

@@ -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()
Copy link

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()
Copy link

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

Copy link
Contributor

@andrehp andrehp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cscatolini cscatolini merged commit 2a6c0a0 into master Aug 9, 2018
@gabrielerzinger gabrielerzinger deleted the refactor/etcd-Bootstrap branch August 9, 2018 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants