Always flush kafka producers in tests
Sometimes, in a very loaded situation, the producer can return and let the consumer start before the topic is actually created.
Adding a producer.flush()
avoids that race condition.
Migrated from D6016 (view on Phabricator)