Skip to content

Commit

Permalink
Merge pull request #113282 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.2-113211

release-23.2: demo: wait for stopper to stop on shutdown
  • Loading branch information
stevendanna authored Nov 1, 2023
2 parents 61f221a + a51410a commit bc1b4e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions pkg/acceptance/generated_cli_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pkg/cli/democluster/demo_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,13 @@ func (c *transientCluster) DrainAndShutdown(ctx context.Context, nodeID int32) e
if err := c.drainAndShutdown(ctx, c.servers[serverIdx].adminClient); err != nil {
return err
}

select {
case <-c.servers[serverIdx].Stopper().IsStopped():
case <-time.After(10 * time.Second):
return errors.Errorf("server stopper not stopped after 10 seconds")
}

c.servers[serverIdx].TestServerInterface = nil
c.servers[serverIdx].adminClient = nil
if c.demoCtx.Multitenant {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#! /usr/bin/env expect -f

# This test is skipped -- its filename lets it hide from the selector in
# TestDockerCLI. Unskip it by renaming after fixing
# https://github.com/cockroachdb/cockroach/issues/110748.

source [file join [file dirname $argv0] common.tcl]

spawn $argv demo --no-line-editor --empty --nodes 3 --multitenant --log-dir=logs
Expand Down

0 comments on commit bc1b4e2

Please sign in to comment.