From b124e5db48233e37a88cd0b0e9263bfb3fe6ee6f Mon Sep 17 00:00:00 2001 From: adityamaru Date: Fri, 11 Nov 2022 16:13:59 -0500 Subject: [PATCH] roachtest: add placeholder type hint Fixes: #91728, #91725, #91726, #91727, #91736 Release note: None --- pkg/cmd/roachtest/tests/multitenant_distsql.go | 2 +- pkg/cmd/roachtest/tests/multitenant_upgrade.go | 2 +- pkg/cmd/roachtest/tests/smoketest_secure.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/roachtest/tests/multitenant_distsql.go b/pkg/cmd/roachtest/tests/multitenant_distsql.go index ffeef337a770..24167bb11bb5 100644 --- a/pkg/cmd/roachtest/tests/multitenant_distsql.go +++ b/pkg/cmd/roachtest/tests/multitenant_distsql.go @@ -81,7 +81,7 @@ func runMultiTenantDistSQL( } storConn := c.Conn(ctx, t.L(), 1) - _, err := storConn.Exec(`SELECT crdb_internal.create_tenant($1)`, tenantID) + _, err := storConn.Exec(`SELECT crdb_internal.create_tenant($1::INT)`, tenantID) require.NoError(t, err) instances := make([]*tenantNode, 0, numInstances) diff --git a/pkg/cmd/roachtest/tests/multitenant_upgrade.go b/pkg/cmd/roachtest/tests/multitenant_upgrade.go index 88e5656fa134..d0228c963f03 100644 --- a/pkg/cmd/roachtest/tests/multitenant_upgrade.go +++ b/pkg/cmd/roachtest/tests/multitenant_upgrade.go @@ -87,7 +87,7 @@ func runMultiTenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster, // auto-update loop (at the time of writing 30s), plus some migrations may be // genuinely long-running. runner.SucceedsSoonDuration = 5 * time.Minute - runner.Exec(t, `SELECT crdb_internal.create_tenant($1)`, tenant11ID) + runner.Exec(t, `SELECT crdb_internal.create_tenant($1::INT)`, tenant11ID) var initialVersion string runner.QueryRow(t, "SHOW CLUSTER SETTING version").Scan(&initialVersion) diff --git a/pkg/cmd/roachtest/tests/smoketest_secure.go b/pkg/cmd/roachtest/tests/smoketest_secure.go index 7ee99b40e4d5..cbce7380ff80 100644 --- a/pkg/cmd/roachtest/tests/smoketest_secure.go +++ b/pkg/cmd/roachtest/tests/smoketest_secure.go @@ -66,7 +66,7 @@ func multitenantSmokeTest(ctx context.Context, t test.Test, c cluster.Cluster) { tenID := 11 ten := createTenantNode(ctx, t, c, c.Node(1), tenID, 2, 8011, 9011) runner := sqlutils.MakeSQLRunner(c.Conn(ctx, t.L(), 1)) - runner.Exec(t, `SELECT crdb_internal.create_tenant($1)`, tenID) + runner.Exec(t, `SELECT crdb_internal.create_tenant($1::INT)`, tenID) ten.start(ctx, t, c, "./cockroach") // this doesn't work yet, roachprod knows nothing about tenants