Tests in this class fail intermittently because they send messages to Kafka in an asynchronous way and assert on the results immediately without waiting for the send operation to complete. This commit updates the tests to wait for send results before asserting on them (similar toa140a9f5). (cherry picked from commit5826111b85)