added error checking for kafka producer in tests