diff --git a/pkg/acceptance/generated_cli_test.go b/pkg/acceptance/generated_cli_test.go index 0386fe57eaad..12ac1f8adb6a 100644 --- a/pkg/acceptance/generated_cli_test.go +++ b/pkg/acceptance/generated_cli_test.go @@ -137,6 +137,13 @@ func TestDockerCLI_test_demo_memory_warning(t *testing.T) { runTestDockerCLI(t, "test_demo_memory_warning", "../cli/interactive_tests/test_demo_memory_warning.tcl") } +func TestDockerCLI_test_demo_multitenant(t *testing.T) { + s := log.Scope(t) + defer s.Close(t) + + runTestDockerCLI(t, "test_demo_multitenant", "../cli/interactive_tests/test_demo_multitenant.tcl") +} + func TestDockerCLI_test_demo_networking(t *testing.T) { s := log.Scope(t) defer s.Close(t) diff --git a/pkg/cli/democluster/demo_cluster.go b/pkg/cli/democluster/demo_cluster.go index 380277d389ad..1dcab49d63b4 100644 --- a/pkg/cli/democluster/demo_cluster.go +++ b/pkg/cli/democluster/demo_cluster.go @@ -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 { diff --git a/pkg/cli/interactive_tests/test_demo_multitenant.tcl.disabled b/pkg/cli/interactive_tests/test_demo_multitenant.tcl similarity index 91% rename from pkg/cli/interactive_tests/test_demo_multitenant.tcl.disabled rename to pkg/cli/interactive_tests/test_demo_multitenant.tcl index 3d277787d79f..fa5b5dc015c8 100644 --- a/pkg/cli/interactive_tests/test_demo_multitenant.tcl.disabled +++ b/pkg/cli/interactive_tests/test_demo_multitenant.tcl @@ -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