sijie commented on a change in pull request #1133: Integration smoke test
URL: https://github.com/apache/bookkeeper/pull/1133#discussion_r167589913
 
 

 ##########
 File path: 
tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
 ##########
 @@ -0,0 +1,89 @@
+/*
+* 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
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.bookkeeper.tests.integration;
+
+import com.github.dockerjava.api.DockerClient;
+
+import java.util.Enumeration;
+
+import org.apache.bookkeeper.client.BookKeeper;
+import org.apache.bookkeeper.client.LedgerEntry;
+import org.apache.bookkeeper.client.LedgerHandle;
+import org.apache.bookkeeper.tests.BookKeeperClusterUtils;
+
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RunWith(Arquillian.class)
+public class TestSmoke {
+    private static final Logger LOG = LoggerFactory.getLogger(TestSmoke.class);
+    private static byte[] PASSWD = "foobar".getBytes();
+
+    @ArquillianResource
+    DockerClient docker;
+
+    private String currentVersion = System.getProperty("currentVersion");
+
+    @Before
+    public void before() throws Exception {
+        // First test to run, formats metadata and bookies
+        if (BookKeeperClusterUtils.metadataFormatIfNeeded(docker, 
currentVersion)) {
+            BookKeeperClusterUtils.formatAllBookies(docker, currentVersion);
+        }
+    }
+
+    @Test
+    public void testBootWriteReadShutdown() throws Exception {
+        
Assert.assertTrue(BookKeeperClusterUtils.startAllBookiesWithVersion(docker, 
currentVersion));
+
+        String zookeeper = 
BookKeeperClusterUtils.zookeeperConnectString(docker);
+        BookKeeper bk = new BookKeeper(zookeeper);
 
 Review comment:
   the point here is not about whether the builder is clear or not, for sure it 
has cons on builder method. the point here is more about we should not use any 
"deprecated" method. more even, we are getting hard to get rid of direct 
zookeeper reference, so I would like to see we avoid using direct zookeeper 
constructor if possible.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to