Skip to content

Commit

Permalink
Merge pull request #5525 from bhandras/etcd_failover_itest_flake_fix
Browse files Browse the repository at this point in the history
harness: remove killed nodes from active nodes
  • Loading branch information
guggero authored Jul 15, 2021
2 parents b92462e + 6dc64f7 commit 8acbe17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kvdb/etcd/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) (
// To ensure that we can submit large transactions.
cfg.MaxTxnOps = 8192
cfg.MaxRequestBytes = 16384 * 1024
cfg.Debug = false
cfg.Logger = "zap"
cfg.LogLevel = "error"

// Listen on random free ports if no ports were specified.
if clientPort == 0 {
Expand Down
7 changes: 6 additions & 1 deletion lntest/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,12 @@ func (n *NetworkHarness) ShutdownNode(node *HarnessNode) error {

// KillNode kills the node (but won't wait for the node process to stop).
func (n *NetworkHarness) KillNode(node *HarnessNode) error {
return node.kill()
if err := node.kill(); err != nil {
return err
}

delete(n.activeNodes, node.NodeID)
return nil
}

// StopNode stops the target node, but doesn't yet clean up its directories.
Expand Down

0 comments on commit 8acbe17

Please sign in to comment.