Skip to content

Commit

Permalink
sql: disable multiple active portals for TestDistSQLReceiverDrainsMeta.
Browse files Browse the repository at this point in the history
We now only support multiple active portals with local plan, so explicitly
disable it for this test for now.

Release note: None
  • Loading branch information
ZhouXing19 committed Apr 7, 2023
1 parent 789c2cd commit 199b177
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/sql/distsql_running_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,14 @@ func TestDistSQLReceiverDrainsMeta(t *testing.T) {
p, err := pgtest.NewPGTest(ctx, tc.Server(0).ServingSQLAddr(), username.RootUser)
require.NoError(t, err)

// We disable multiple active portals here as it only supports local-only plan.
// TODO(sql-sessions): remove this line when we finish
// https://github.com/cockroachdb/cockroach/issues/100822.
require.NoError(t, p.SendOneLine(`Query {"String": "SET multiple_active_portals_enabled = false"}`))
until := pgtest.ParseMessages("ReadyForQuery")
_, err = p.Until(false /* keepErrMsg */, until...)
require.NoError(t, err)

// Execute the test query asking for at most 25 rows.
require.NoError(t, p.SendOneLine(`Query {"String": "USE test"}`))
require.NoError(t, p.SendOneLine(fmt.Sprintf(`Parse {"Query": "%s"}`, testQuery)))
Expand All @@ -649,7 +657,7 @@ func TestDistSQLReceiverDrainsMeta(t *testing.T) {
// Retrieve all of the results. We need to receive until two 'ReadyForQuery'
// messages are returned (the first one for "USE test" query and the second
// one is for the limited portal execution).
until := pgtest.ParseMessages("ReadyForQuery\nReadyForQuery")
until = pgtest.ParseMessages("ReadyForQuery\nReadyForQuery")
msgs, err := p.Until(false /* keepErrMsg */, until...)
require.NoError(t, err)
received := pgtest.MsgsToJSONWithIgnore(msgs, &datadriven.TestData{})
Expand Down

0 comments on commit 199b177

Please sign in to comment.