Merge pull request #5525 from bhandras/etcd_failover_itest_flake_fix

harness: remove killed nodes from active nodes
This commit is contained in:
Oliver Gugger 2021-07-15 17:27:07 +02:00 committed by GitHub
commit 8acbe177fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

@ -69,6 +69,9 @@ func NewEmbeddedEtcdInstance(path string, clientPort, peerPort uint16) (
// To ensure that we can submit large transactions. // To ensure that we can submit large transactions.
cfg.MaxTxnOps = 8192 cfg.MaxTxnOps = 8192
cfg.MaxRequestBytes = 16384 * 1024 cfg.MaxRequestBytes = 16384 * 1024
cfg.Debug = false
cfg.Logger = "zap"
cfg.LogLevel = "error"
// Listen on random free ports if no ports were specified. // Listen on random free ports if no ports were specified.
if clientPort == 0 { if clientPort == 0 {

@ -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). // KillNode kills the node (but won't wait for the node process to stop).
func (n *NetworkHarness) KillNode(node *HarnessNode) error { 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. // StopNode stops the target node, but doesn't yet clean up its directories.