Skip to content

Commit

Permalink
test: fix lossy_ddl test (#987)
Browse files Browse the repository at this point in the history
ref #442
  • Loading branch information
wk989898 authored Feb 13, 2025
1 parent da834db commit e5d2376
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion downstreamadapter/sink/blackhole.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ func (s *BlackHoleSink) SetTableSchemaStore(tableSchemaStore *util.TableSchemaSt
}

func (s *BlackHoleSink) AddDMLEvent(event *commonEvent.DMLEvent) {
log.Debug("BlackHoleSink: DML Event", zap.Any("dml", event))
// NOTE: don't change the log, integration test `lossy_ddl` depends on it.
// ref: https://github.com/pingcap/ticdc/blob/da834db76e0662ff15ef12645d1f37bfa6506d83/tests/integration_tests/lossy_ddl/run.sh#L23
log.Debug("BlackHoleSink: WriteEvents", zap.Any("dml", event))
for _, callback := range event.PostTxnFlushed {
callback()
}
Expand All @@ -58,6 +60,9 @@ func (s *BlackHoleSink) WriteBlockEvent(event commonEvent.BlockEvent) error {
switch event.GetType() {
case commonEvent.TypeDDLEvent:
e := event.(*commonEvent.DDLEvent)
// NOTE: don't change the log, integration test `lossy_ddl` depends on it.
// ref: https://github.com/pingcap/ticdc/blob/da834db76e0662ff15ef12645d1f37bfa6506d83/tests/integration_tests/lossy_ddl/run.sh#L17
log.Debug("BlackHoleSink: DDL Event", zap.Any("ddl", e))
for _, callback := range e.PostTxnFlushed {
callback()
}
Expand Down

0 comments on commit e5d2376

Please sign in to comment.