Skip to content

Commit 6b56270

Browse files
committed
fix: add SqlMaxAllowedPacket mock invariant for tabletmanager tests
The cherry-pick of vitessio#19878 added maxQuerySize() calls in the copy phase. The tabletmanager test framework uses a strict mock DB client that didn't expect this query, causing test failures.
1 parent c0689d2 commit 6b56270

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

go/vt/vttablet/tabletmanager/framework_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ func (tenv *testEnv) addTablet(t *testing.T, id int, keyspace, shard string) *fa
171171

172172
vrdbClient := binlogplayer.NewMockDBClient(t)
173173
vrdbClient.Tag = fmt.Sprintf("tablet:%d", id)
174+
vrdbClient.AddInvariant(vreplication.SqlMaxAllowedPacket, sqltypes.MakeTestResult(
175+
sqltypes.MakeTestFields("max_allowed_packet", "int64"),
176+
"65536",
177+
))
174178
tenv.tmc.tablets[id] = &fakeTabletConn{
175179
tablet: tablet,
176180
vrdbClient: vrdbClient,

0 commit comments

Comments
 (0)