From 597651a55f69ea94dbb95e8dd37c262496fd8aaa Mon Sep 17 00:00:00 2001 From: Olga Shestopalova Date: Fri, 6 Oct 2023 08:46:54 -0400 Subject: [PATCH] fix vreplication test Signed-off-by: Olga Shestopalova --- go/vt/vttablet/tabletmanager/rpc_vreplication_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go index ce7e85ac495..069f5977fe9 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go @@ -60,6 +60,8 @@ const ( getAutoIncrementStep = "select @@session.auto_increment_increment" setSessionTZ = "set @@session.time_zone = '+00:00'" setNames = "set names 'binary'" + setNetReadTimeout = "set @@session.net_read_timeout = 300" + setNetWriteTimeout = "set @@session.net_write_timeout = 600" getBinlogRowImage = "select @@binlog_row_image" insertStreamsCreatedLog = "insert into _vt.vreplication_log(vrepl_id, type, state, message) values(1, 'Stream Created', '', '%s'" getVReplicationRecord = "select * from _vt.vreplication where id = 1" @@ -324,6 +326,8 @@ func TestMoveTables(t *testing.T) { ftc.vrdbClient.ExpectRequest(fmt.Sprintf(updatePickedSourceTablet, tenv.cells[0], sourceTabletUID), &sqltypes.Result{}, nil) ftc.vrdbClient.ExpectRequest(setSessionTZ, &sqltypes.Result{}, nil) ftc.vrdbClient.ExpectRequest(setNames, &sqltypes.Result{}, nil) + ftc.vrdbClient.ExpectRequest(setNetReadTimeout, &sqltypes.Result{}, nil) + ftc.vrdbClient.ExpectRequest(setNetWriteTimeout, &sqltypes.Result{}, nil) ftc.vrdbClient.ExpectRequest(getRowsCopied, sqltypes.MakeTestResult( sqltypes.MakeTestFields( @@ -895,6 +899,8 @@ func TestFailedMoveTablesCreateCleanup(t *testing.T) { &sqltypes.Result{}, nil) targetTablet.vrdbClient.ExpectRequest(setSessionTZ, &sqltypes.Result{}, nil) targetTablet.vrdbClient.ExpectRequest(setNames, &sqltypes.Result{}, nil) + targetTablet.vrdbClient.ExpectRequest(setNetReadTimeout, &sqltypes.Result{}, nil) + targetTablet.vrdbClient.ExpectRequest(setNetWriteTimeout, &sqltypes.Result{}, nil) targetTablet.vrdbClient.ExpectRequest(getRowsCopied, sqltypes.MakeTestResult( sqltypes.MakeTestFields(