pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ivankelly commented on a change in pull request #2101: Migrate compaction and s3 offload test to testcontainers
Date Fri, 13 Jul 2018 16:37:48 GMT
ivankelly commented on a change in pull request #2101: Migrate compaction and s3 offload test
to testcontainers
URL: https://github.com/apache/incubator-pulsar/pull/2101#discussion_r202405824
 
 

 ##########
 File path: tests/integration/compaction/src/test/java/org/apache/pulsar/tests/integration/TestCompaction.java
 ##########
 @@ -18,53 +18,37 @@
  */
 package org.apache.pulsar.tests.integration;
 
-import com.github.dockerjava.api.DockerClient;
-
-import java.util.concurrent.TimeUnit;
-
 import org.apache.pulsar.client.api.Consumer;
 import org.apache.pulsar.client.api.Message;
 import org.apache.pulsar.client.api.MessageBuilder;
-import org.apache.pulsar.client.api.MessageRoutingMode;
 import org.apache.pulsar.client.api.Producer;
 import org.apache.pulsar.client.api.PulsarClient;
-import org.apache.pulsar.tests.DockerUtils;
-import org.apache.pulsar.tests.PulsarClusterUtils;
-import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.arquillian.testng.Arquillian;
+import org.apache.pulsar.tests.topologies.PulsarClusterTestBase;
+import org.testcontainers.containers.Container;
 import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-public class TestCompaction extends Arquillian {
-    private static String clusterName = "test";
+import static java.util.stream.Collectors.joining;
 
-    @ArquillianResource
-    DockerClient docker;
+public class TestCompaction extends PulsarClusterTestBase {
 
-    @BeforeMethod
-    public void waitServicesUp() throws Exception {
-        Assert.assertTrue(PulsarClusterUtils.waitZooKeeperUp(docker, clusterName, 30, TimeUnit.SECONDS));
-        Assert.assertTrue(PulsarClusterUtils.waitAllBrokersUp(docker, clusterName));
+    @BeforeClass
+    @Override
+    public void setupCluster() throws Exception {
+        super.setupClusterNoWorker();
 
 Review comment:
   It feels like this is something that should be done via the spec. 
   
   So for define a getClusterSpec() method in PulsarClusterTestBase, and for any test that
deviates from the standard cluster, have them override this and provide a different spec.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message