Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildtools/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
<Logger name="org.apache.pulsar" level="info"/>
<Logger name="org.apache.bookkeeper" level="info"/>
<Logger name="org.apache.kafka" level="info"/>
<Logger name="org.testcontainers" level="info"/>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
import static java.util.stream.Collectors.joining;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;

import java.util.Collections;
import java.util.EnumSet;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;

import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.client.admin.PulsarAdmin;
import org.apache.pulsar.client.api.AuthenticationFactory;
import org.apache.pulsar.client.api.Consumer;
Expand All @@ -35,8 +35,6 @@
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.client.impl.ProducerImpl;
import org.apache.pulsar.client.impl.PulsarClientImpl;
import org.apache.pulsar.client.impl.auth.AuthenticationToken;
import org.apache.pulsar.common.policies.data.AuthAction;
import org.apache.pulsar.common.policies.data.TenantInfo;
Expand All @@ -48,17 +46,13 @@
import org.apache.pulsar.tests.integration.topologies.PulsarClusterSpec;
import org.apache.pulsar.tests.integration.topologies.PulsarClusterTestBase;
import org.testcontainers.containers.Network;
import org.testng.ITest;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public abstract class PulsarTokenAuthenticationBaseSuite extends PulsarClusterTestBase implements ITest {
public abstract class PulsarTokenAuthenticationBaseSuite extends PulsarClusterTestBase {

protected String superUserAuthToken;
protected String proxyAuthToken;
Expand All @@ -76,7 +70,7 @@ public abstract class PulsarTokenAuthenticationBaseSuite extends PulsarClusterTe

protected ZKContainer<?> cmdContainer;

@BeforeSuite
@BeforeClass
@Override
public void setupCluster() throws Exception {
// Before starting the cluster, generate the secret key and the token
Expand Down Expand Up @@ -134,18 +128,13 @@ public void setupCluster() throws Exception {
log.info("Cluster {} is setup", spec.clusterName());
}

@AfterSuite(alwaysRun = true)
@AfterClass(alwaysRun = true)
@Override
public void tearDownCluster() {
super.tearDownCluster();
cmdContainer.close();
}

@Override
public String getTestName() {
return "token-auth-test-suite";
}

@Test
public void testPublishWithTokenAuth() throws Exception {
final String tenant = "token-test-tenant" + randomName(4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,19 @@

import org.apache.pulsar.tests.integration.containers.PulsarContainer;
import org.apache.pulsar.tests.integration.topologies.PulsarStandaloneTestBase;
import org.testng.ITest;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;

public class PulsarStandaloneTestSuite2_2 extends PulsarStandaloneTestBase implements ITest {
public class PulsarStandaloneTestSuite2_2 extends PulsarStandaloneTestBase {

@BeforeSuite
@BeforeClass
public void setUpCluster() throws Exception {
super.startCluster(PulsarContainer.PULSAR_2_2_IMAGE_NAME);
}

@AfterSuite(alwaysRun = true)
@AfterClass(alwaysRun = true)
public void tearDownCluster() throws Exception {
super.stopCluster();
}

@Override
public String getTestName() {
return "pulsar-standalone-suite";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,19 @@

import org.apache.pulsar.tests.integration.containers.PulsarContainer;
import org.apache.pulsar.tests.integration.topologies.PulsarStandaloneTestBase;
import org.testng.ITest;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;

public class PulsarStandaloneTestSuite2_3 extends PulsarStandaloneTestBase implements ITest {
public class PulsarStandaloneTestSuite2_3 extends PulsarStandaloneTestBase {

@BeforeSuite
@BeforeClass
public void setUpCluster() throws Exception {
super.startCluster(PulsarContainer.PULSAR_2_3_IMAGE_NAME);
}

@AfterSuite(alwaysRun = true)
@AfterClass(alwaysRun = true)
public void tearDownCluster() throws Exception {
super.stopCluster();
}
@Override
public String getTestName() {
return "pulsar-standalone-suite";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,19 @@

import org.apache.pulsar.tests.integration.containers.PulsarContainer;
import org.apache.pulsar.tests.integration.topologies.PulsarStandaloneTestBase;
import org.testng.ITest;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;

public class PulsarStandaloneTestSuite2_4 extends PulsarStandaloneTestBase implements ITest {
public class PulsarStandaloneTestSuite2_4 extends PulsarStandaloneTestBase {

@BeforeSuite
@BeforeClass
public void setUpCluster() throws Exception {
super.startCluster(PulsarContainer.PULSAR_2_4_IMAGE_NAME);
}

@AfterSuite(alwaysRun = true)
@AfterClass(alwaysRun = true)
public void tearDownCluster() throws Exception {
super.stopCluster();
}
@Override
public String getTestName() {
return "pulsar-standalone-suite";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,19 @@

import org.apache.pulsar.tests.integration.containers.PulsarContainer;
import org.apache.pulsar.tests.integration.topologies.PulsarStandaloneTestBase;
import org.testng.ITest;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;

public class PulsarStandaloneTestSuite2_5 extends PulsarStandaloneTestBase implements ITest {
public class PulsarStandaloneTestSuite2_5 extends PulsarStandaloneTestBase {

@BeforeSuite
@BeforeClass
public void setUpCluster() throws Exception {
super.startCluster(PulsarContainer.PULSAR_2_5_IMAGE_NAME);
}

@AfterSuite(alwaysRun = true)
@AfterClass(alwaysRun = true)
public void tearDownCluster() throws Exception {
super.stopCluster();
}
@Override
public String getTestName() {
return "pulsar-standalone-suite";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ public void testPublishAndConsume(String serviceUrl, boolean isPersistent) throw
public void testBatchMessagePublishAndConsume(String serviceUrl, boolean isPersistent) throws Exception {
super.testBatchMessagePublishAndConsume(serviceUrl, isPersistent);
}

@Test(dataProvider = "StandaloneServiceUrlAndTopics")
public void testBatchIndexAckDisabled(String serviceUrl, boolean isPersistent) throws Exception {
super.testBatchIndexAckDisabled(serviceUrl);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ public void testPublishAndConsume(String serviceUrl, boolean isPersistent) throw
public void testBatchMessagePublishAndConsume(String serviceUrl, boolean isPersistent) throws Exception {
super.testBatchMessagePublishAndConsume(serviceUrl, isPersistent);
}

@Test(dataProvider = "StandaloneServiceUrlAndTopics")
public void testBatchIndexAckDisabled(String serviceUrl, boolean isPersistent) throws Exception {
super.testBatchIndexAckDisabled(serviceUrl);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
*/
package org.apache.pulsar.tests.integration.cli;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import java.io.IOException;
import java.net.URI;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import lombok.extern.slf4j.Slf4j;
import org.apache.bookkeeper.client.BKException;
import org.apache.bookkeeper.conf.ServerConfiguration;
Expand All @@ -39,26 +53,10 @@
import org.apache.pulsar.tests.integration.topologies.PulsarCluster;
import org.apache.pulsar.tests.integration.topologies.PulsarClusterSpec;
import org.apache.zookeeper.ZooKeeper;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import java.io.IOException;
import java.net.URI;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;

@Slf4j
public class ClusterMetadataTearDownTest {

Expand All @@ -81,7 +79,7 @@ public class ClusterMetadataTearDownTest {
private PulsarClient client;
private PulsarAdmin admin;

@BeforeSuite
@BeforeClass
public void setupCluster() throws Exception {
pulsarCluster.start();
metadataServiceUri = "zk+null://" + pulsarCluster.getZKConnString() + "/ledgers";
Expand All @@ -98,7 +96,7 @@ public void setupCluster() throws Exception {
admin = PulsarAdmin.builder().serviceHttpUrl(pulsarCluster.getHttpServiceUrl()).build();
}

@AfterSuite(alwaysRun = true)
@AfterClass(alwaysRun = true)
public void tearDownCluster() {
try {
ledgerManager.close();
Expand Down
Loading