Fix kafka ut (#18527)

Signed-off-by: yun.zhang <yun.zhang@zilliz.com>
pull/18534/head
jaime 2022-08-04 16:02:35 +08:00 committed by GitHub
parent 6f7095141e
commit c345df41a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -157,7 +157,7 @@ func Consume3(ctx context.Context, t *testing.T, kc *kafkaClient, topic string,
consumer.Ack(msg)
(*total)++
log.Info("Consume3 RECV", zap.Any("v", BytesToInt(msg.Payload())))
log.Info("Consume3 RECV", zap.Any("v", BytesToInt(msg.Payload())), zap.Int("total", *total))
}
}
}
@ -350,5 +350,7 @@ func produceData(ctx context.Context, t *testing.T, producer mqwrapper.Producer,
msgIDs = append(msgIDs, msgID)
assert.Nil(t, err)
}
producer.(*kafkaProducer).p.Flush(500)
return msgIDs
}