You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by GitBox <gi...@apache.org> on 2019/08/05 17:23:28 UTC
[GitHub] [bigtop] evans-ye commented on a change in pull request #537:
BIGTOP-3168: Kafka smoke tests implementation
evans-ye commented on a change in pull request #537: BIGTOP-3168: Kafka smoke tests implementation
URL: https://github.com/apache/bigtop/pull/537#discussion_r310709377
##########
File path: bigtop-tests/smoke-tests/kafka/TestKafkaSmoke.groovy
##########
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bigtop.itest.kafka
+
+import org.junit.BeforeClass
+import org.junit.AfterClass
+import org.apache.bigtop.itest.shell.Shell
+import static org.junit.Assert.assertNotNull
+import static org.junit.Assert.assertTrue
+import org.junit.Test
+import org.apache.bigtop.itest.JarContent
+import org.apache.bigtop.itest.TestUtils
+import org.junit.runner.RunWith
+
+class TestKafkaSmoke {
+ static Shell sh = new Shell("/bin/bash -s");
+
+ static final String KAFKA_HOME = "/usr/lib/kafka"
+ static final String KAFKA_CONFIG = KAFKA_HOME + "/config/server.properties "
+ static final String KAFKA_TOPICS = KAFKA_HOME + "/bin/kafka-topics.sh "
+ static final String KAFKA_SERVER_START = KAFKA_HOME + "/bin/kafka-server-start.sh "
+ static final String KAFKA_SERVER_STOP = KAFKA_HOME + "/bin/kafka-server-stop.sh "
+
+ @BeforeClass
+ static void kafkaSetUp() {
+ /* Restart kafka server with new broker id 111
+ * Enable delete.topic.enable
+ */
+ sh.exec(KAFKA_SERVER_STOP);
+ sh.exec(KAFKA_SERVER_START + KAFKA_CONFIG
+ + " --override delete.topic.enable=true"
+ + " --override broker.id=111"
+ + " --override port=9192"
+ + " --override log.dirs=/tmp/kafka-logs-111 &"
Review comment:
Yup. That's good. But now the PR has conflict with the master because we merged livy PR before this one. Please resolve it in smoke-tests.sh
```
<<<<<<< BIGTOP-3168
export KAFKA_HOME=${KAFKA_HOME:-/usr/lib/kafka}
=======
export LIVY_HOME=${LIVY_HOME:-/usr/lib/livy}
>>>>>>> master
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services