iwasakims commented on code in PR #922:
URL: https://github.com/apache/bigtop/pull/922#discussion_r911462326


##########
bigtop-tests/smoke-tests/kafka/TestKafkaSmoke.groovy:
##########
@@ -44,9 +51,27 @@ class TestKafkaSmoke {
   }
 
   @Test
-  public void testCreateTopics() {
+  public void test0CreateTopics() {
     sh.exec(KAFKA_TOPICS + " --create --zookeeper localhost:2181 
--replication-factor 1 --partitions 1 --topic test");
     sh.exec(KAFKA_TOPICS + " --list --zookeeper localhost:2181");
     assertTrue(" Create Kafka topics failed. " + sh.getOut() + " " + 
sh.getErr(), sh.getRet() == 0);
   }
+
+  @Test
+  public void test1WriteKafkaTopics() {
+    sh.exec("echo '" + TEST_MESSAGE + "' | " + KAFKA_PRODUCER + " 
--broker-list localhost:9092 --topic test");
+    assertTrue(
+      " Write Kafka topics failed. " + sh.getOut() + " " + sh.getErr(),
+      sh.getRet() == 0
+    );
+  }
+
+  @Test
+  public void test2ReadKafkaTopics() {
+    sh.exec(KAFKA_CONSUMER + " --bootstrap-server localhost:9092 --topic test 
--partition 0 --offset 0 --max-messages 1");

Review Comment:
   `--timeout-ms` should be given to bail out fast in failure scenario?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to