Skip to content

Commit

Permalink
roachtest: fix gossip/restart tests
Browse files Browse the repository at this point in the history
This patch fixes `acceptance/gossip/restart` and `gossip/restart` by
waiting for all nodes to report ready before restarting nodes, and
unskips them.

Epic: none
Release note: None
  • Loading branch information
erikgrinaker committed Apr 4, 2023
1 parent baa8fa0 commit c454fe1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func registerAcceptance(r registry.Registry) {
registry.OwnerKV: {
{name: "decommission-self", fn: runDecommissionSelf},
{name: "event-log", fn: runEventLog},
{name: "gossip/peerings", fn: runGossipPeerings, skip: "flaky test. tracked in #96091"},
{name: "gossip/peerings", fn: runGossipPeerings},
{name: "gossip/restart", fn: runGossipRestart},
{
name: "gossip/restart-node-one",
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/roachtest/tests/gossip.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ func runGossipPeerings(ctx context.Context, t test.Test, c cluster.Cluster) {
deadline := timeutil.Now().Add(time.Minute)

for i := 1; timeutil.Now().Before(deadline); i++ {
WaitForReady(ctx, t, c, c.All())
if err := g.check(ctx, c, g.hasPeers(c.Spec().NodeCount)); err != nil {
t.Fatal(err)
}
Expand All @@ -308,8 +309,6 @@ func runGossipPeerings(ctx context.Context, t test.Test, c cluster.Cluster) {
}

func runGossipRestart(ctx context.Context, t test.Test, c cluster.Cluster) {
t.Skip("skipping flaky acceptance/gossip/restart", "https://github.com/cockroachdb/cockroach/issues/48423")

c.Put(ctx, t.Cockroach(), "./cockroach")
c.Start(ctx, t.L(), option.DefaultStartOpts(), install.MakeClusterSettings())

Expand All @@ -322,6 +321,7 @@ func runGossipRestart(ctx context.Context, t test.Test, c cluster.Cluster) {
deadline := timeutil.Now().Add(time.Minute)

for i := 1; timeutil.Now().Before(deadline); i++ {
WaitForReady(ctx, t, c, c.All())
g.checkConnectedAndFunctional(ctx, t, c)
t.L().Printf("%d: OK\n", i)

Expand Down

0 comments on commit c454fe1

Please sign in to comment.