Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@
import org.apache.zookeeper.KeeperException;
import org.awaitility.Awaitility;
import org.mockito.ArgumentCaptor;
import org.mockito.internal.util.MockUtil;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

@Slf4j
@Test(groups = "flaky")
@Test(groups = "broker-admin")
public class PersistentTopicsTest extends MockedPulsarServiceBaseTest {

private PersistentTopics persistentTopics;
Expand Down Expand Up @@ -1501,6 +1502,8 @@ public void testDeleteTopic() throws Exception {
verify(response, timeout(5000).times(1)).resume(responseCaptor.capture());
Assert.assertEquals(responseCaptor.getValue().getStatus(), Response.Status.NO_CONTENT.getStatusCode());

MockUtil.resetMock(brokerService);

CompletableFuture<Void> deleteTopicFuture2 = new CompletableFuture<>();
ArgumentCaptor<RestException> errorCaptor = ArgumentCaptor.forClass(RestException.class);
deleteTopicFuture2.completeExceptionally(new MetadataStoreException("test exception"));
Expand All @@ -1511,6 +1514,8 @@ public void testDeleteTopic() throws Exception {
Assert.assertEquals(errorCaptor.getValue().getResponse().getStatus(),
Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());

MockUtil.resetMock(brokerService);

CompletableFuture<Void> deleteTopicFuture3 = new CompletableFuture<>();
response = mock(AsyncResponse.class);
deleteTopicFuture3.completeExceptionally(new MetadataStoreException.NotFoundException());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.testng.annotations.Test;

@Slf4j
@Test(groups = "flaky")
@Test(groups = "broker-admin")
public class TopicMessageTTLTest extends MockedPulsarServiceBaseTest {

private final String testTenant = "my-tenant";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* However it is useful to see which logs are produced when there's an
* failure or error in authentication.
*/
@Test(groups = "flaky")
@Test(groups = "broker")
public class AuthLogsTest extends MockedPulsarServiceBaseTest {
private static final Logger log = LoggerFactory.getLogger(AuthLogsTest.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

@Test(groups = "flaky")
@Test(groups = "broker")
public class AuthorizationTest extends MockedPulsarServiceBaseTest {

public AuthorizationTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

@Test(groups = "flaky")
@Test(groups = "broker")
public class InactiveTopicDeleteTest extends BrokerTestBase {

@BeforeMethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
import org.testng.annotations.Test;

@SuppressWarnings("unchecked")
@Test(groups = "flaky")
@Test(groups = "broker")
public class ServerCnxTest {
protected EmbeddedChannel channel;
private ServiceConfiguration svcConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -41,7 +40,7 @@
import org.testng.annotations.Test;

@Slf4j
@Test(groups = "flaky")
@Test(groups = "broker-api")
public class ClientDeduplicationTest extends ProducerConsumerBase {

@DataProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
import org.testng.annotations.Test;

@Slf4j
@Test(groups = "flaky")
@Test(groups = "broker-impl")
public class MultiTopicsReaderTest extends MockedPulsarServiceBaseTest {

private static final String subscription = "reader-multi-topics-sub";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

@Test(groups = "flaky")
@Test(groups = "broker-impl")
public class RawReaderTest extends MockedPulsarServiceBaseTest {

private static final String subscription = "foobar-sub";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.concurrent.EventExecutor;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.CompletableFuture;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.concurrent.EventExecutor;
import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import org.apache.bookkeeper.mledger.Position;
Expand Down Expand Up @@ -89,7 +89,7 @@
* End to end transaction test.
*/
@Slf4j
@Test(groups = "flaky")
@Test(groups = "broker-impl")
public class TransactionEndToEndTest extends TransactionTestBase {

protected static final int TOPIC_PARTITION = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* End to end transaction test.
*/
@Slf4j
@Test(groups = "flaky")
@Test(groups = "broker-impl")
public class TransactionEndToEndWithoutBatchIndexAckTest extends TransactionEndToEndTest {

@BeforeClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertFalse;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
Expand All @@ -45,7 +46,6 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import io.netty.buffer.ByteBuf;
import lombok.Cleanup;
import lombok.SneakyThrows;
import org.apache.bookkeeper.client.BookKeeper;
Expand Down Expand Up @@ -90,7 +90,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

@Test(groups = "flaky")
@Test(groups = "broker-impl")
public class CompactionTest extends MockedPulsarServiceBaseTest {
private ScheduledExecutorService compactionScheduler;
private BookKeeper bk;
Expand Down