Skip to content

Commit

Permalink
Adjust unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Aug 23, 2024
1 parent c9a0728 commit 81a4d85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion go/vt/vttablet/tabletserver/vstreamer/vstreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ func (vs *vstreamer) parseEvents(ctx context.Context, events <-chan mysql.Binlog

// Only the following patterns are possible:
// BEGIN->ROWs or Statements->GTID->COMMIT. In the case of large transactions, this can be broken into chunks.
// BEGIN->JOURNAL->GTID->COMMIT
// BEGIN->JOURNAL
// ->GTID->COMMIT. This is a special case where the journal is sent immediately as some consumers stop on reshard events.
// GTID->DDL
// GTID->OTHER
// HEARTBEAT is issued if there's inactivity, which is likely
Expand Down
16 changes: 10 additions & 6 deletions go/vt/vttablet/tabletserver/vstreamer/vstreamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1731,12 +1731,16 @@ func TestJournal(t *testing.T) {
"commit",
},
// External table events don't get sent.
output: [][]string{{
`begin`,
`type:JOURNAL journal:{id:1 migration_type:SHARDS}`,
`gtid`,
`commit`,
}},
output: [][]string{
{
`begin`,
`type:JOURNAL journal:{id:1 migration_type:SHARDS}`,
},
{
`gtid`,
`commit`,
},
},
}}
runCases(t, nil, testcases, "", nil)
}
Expand Down

0 comments on commit 81a4d85

Please sign in to comment.