Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug PersistentDispatcherFailoverConsumerTest, ignore other tests #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
106 changes: 53 additions & 53 deletions .github/workflows/ci-unit-broker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,64 +68,64 @@ jobs:
if: steps.docs.outputs.changed_only == 'no'
run: mvn clean install -DskipTests

- name: run unit tests pulsar broker reader test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=ReaderTest' -pl pulsar-broker

- name: run unit tests pulsar broker rack aware test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=RackAwareTest' -pl pulsar-broker

- name: run unit tests pulsar broker simple producer consumer test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=SimpleProducerConsumerTest' -pl pulsar-broker

- name: run unit tests pulsar broker V1 producer consumer test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=V1_ProducerConsumerTest' -pl pulsar-broker

- name: run unit tests pulsar broker persistent failover end to end test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=PersistentFailoverE2ETest' -pl pulsar-broker

- name: run unit tests pulsar broker client integration test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=BrokerClientIntegrationTest' -pl pulsar-broker

- name: run unit tests pulsar broker replicatior rate limiter test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=ReplicatorRateLimiterTest' -pl pulsar-broker
# - name: run unit tests pulsar broker reader test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=ReaderTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker rack aware test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=RackAwareTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker simple producer consumer test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=SimpleProducerConsumerTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker V1 producer consumer test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=V1_ProducerConsumerTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker persistent failover end to end test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=PersistentFailoverE2ETest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker client integration test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=BrokerClientIntegrationTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker replicatior rate limiter test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=ReplicatorRateLimiterTest' -pl pulsar-broker

- name: run unit tests pulsar broker persistent dispatcher failover consumer test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=PersistentDispatcherFailoverConsumerTest' -pl pulsar-broker

- name: run unit tests pulsar broker admin api test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=AdminApiTest' -pl pulsar-broker

- name: run unit tests pulsar broker v1 admin api test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=V1_AdminApiTest' -pl pulsar-broker

- name: run unit tests pulsar broker compaction test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=CompactionTest' -pl pulsar-broker

- name: run unit tests pulsar broker batch message test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=BatchMessageTest' -pl pulsar-broker
- name: run unit tests pulsar broker partitioned topics schema test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=PartitionedTopicsSchemaTest' -pl pulsar-broker
- name: run unit test pulsar-broker
if: steps.docs.outputs.changed_only == 'no'
run: |
df -h
free -h
mvn test -e '-Dtest=!PersistentTransactionBufferTest,!PulsarFunctionE2ESecurityTest,!ServerCnxTest,!AdminApiOffloadTest,!AdminApiSchemaValidationEnforced,!V1_AdminApiTest2,!ProxyPublishConsumeTlsTest,!PulsarFunctionE2ETest,!MessageIdSerialization,!AdminApiTest2,!PulsarFunctionLocalRunTest,!PartitionedProducerConsumerTest,!KafkaProducerSimpleConsumerTest,!MessagePublishThrottlingTest,!ReaderTest,!RackAwareTest,!SimpleProducerConsumerTest,!V1_ProducerConsumerTest,!PersistentFailoverE2ETest,!BrokerClientIntegrationTest,!ReplicatorRateLimiterTest,!PersistentDispatcherFailoverConsumerTest,!AdminApiTest,!V1_AdminApiTest,!CompactionTest,!BatchMessageTest,!PartitionedTopicsSchemaTest' -DfailIfNoTests=false -pl pulsar-broker
# - name: run unit tests pulsar broker admin api test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=AdminApiTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker v1 admin api test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=V1_AdminApiTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker compaction test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=CompactionTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker batch message test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=BatchMessageTest' -pl pulsar-broker
#
# - name: run unit tests pulsar broker partitioned topics schema test
# if: steps.docs.outputs.changed_only == 'no'
# run: mvn test -DfailIfNoTests=false '-Dtest=PartitionedTopicsSchemaTest' -pl pulsar-broker
#
# - name: run unit test pulsar-broker
# if: steps.docs.outputs.changed_only == 'no'
# run: |
# df -h
# free -h
# mvn test -e '-Dtest=!PersistentTransactionBufferTest,!PulsarFunctionE2ESecurityTest,!ServerCnxTest,!AdminApiOffloadTest,!AdminApiSchemaValidationEnforced,!V1_AdminApiTest2,!ProxyPublishConsumeTlsTest,!PulsarFunctionE2ETest,!MessageIdSerialization,!AdminApiTest2,!PulsarFunctionLocalRunTest,!PartitionedProducerConsumerTest,!KafkaProducerSimpleConsumerTest,!MessagePublishThrottlingTest,!ReaderTest,!RackAwareTest,!SimpleProducerConsumerTest,!V1_ProducerConsumerTest,!PersistentFailoverE2ETest,!BrokerClientIntegrationTest,!ReplicatorRateLimiterTest,!PersistentDispatcherFailoverConsumerTest,!AdminApiTest,!V1_AdminApiTest,!CompactionTest,!BatchMessageTest,!PartitionedTopicsSchemaTest' -DfailIfNoTests=false -pl pulsar-broker

- name: package surefire artifacts
if: failure()
Expand Down
File renamed without changes.
144 changes: 144 additions & 0 deletions .github/workflows/ignore/ci-unit-broker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
#
# 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.
#

name: CI - Unit - Brokers
on:
pull_request:
branches:
- master

jobs:

unit-tests:
name:
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .github deployment .asf.yaml .ci ct.yaml

- name: Set up JDK 1.8
uses: actions/setup-java@v1
if: steps.docs.outputs.changed_only == 'no'
with:
java-version: 1.8

- name: Set up Maven
uses: apache/pulsar-test-infra/setup-maven@master
if: steps.docs.outputs.changed_only == 'no'
with:
maven-version: 3.6.1

- name: clean disk
if: steps.docs.outputs.changed_only == 'no'
run: |
sudo swapoff /swapfile
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt clean
docker rmi $(docker images -q) -f
df -h

- name: run unit tests install by skip tests
if: steps.docs.outputs.changed_only == 'no'
run: mvn clean install -DskipTests

- name: run unit tests pulsar broker reader test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=ReaderTest' -pl pulsar-broker

- name: run unit tests pulsar broker rack aware test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=RackAwareTest' -pl pulsar-broker

- name: run unit tests pulsar broker simple producer consumer test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=SimpleProducerConsumerTest' -pl pulsar-broker

- name: run unit tests pulsar broker V1 producer consumer test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=V1_ProducerConsumerTest' -pl pulsar-broker

- name: run unit tests pulsar broker persistent failover end to end test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=PersistentFailoverE2ETest' -pl pulsar-broker

- name: run unit tests pulsar broker client integration test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=BrokerClientIntegrationTest' -pl pulsar-broker

- name: run unit tests pulsar broker replicatior rate limiter test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=ReplicatorRateLimiterTest' -pl pulsar-broker

- name: run unit tests pulsar broker persistent dispatcher failover consumer test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=PersistentDispatcherFailoverConsumerTest' -pl pulsar-broker

- name: run unit tests pulsar broker admin api test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=AdminApiTest' -pl pulsar-broker

- name: run unit tests pulsar broker v1 admin api test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=V1_AdminApiTest' -pl pulsar-broker

- name: run unit tests pulsar broker compaction test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=CompactionTest' -pl pulsar-broker

- name: run unit tests pulsar broker batch message test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=BatchMessageTest' -pl pulsar-broker

- name: run unit tests pulsar broker partitioned topics schema test
if: steps.docs.outputs.changed_only == 'no'
run: mvn test -DfailIfNoTests=false '-Dtest=PartitionedTopicsSchemaTest' -pl pulsar-broker

- name: run unit test pulsar-broker
if: steps.docs.outputs.changed_only == 'no'
run: |
df -h
free -h
mvn test -e '-Dtest=!PersistentTransactionBufferTest,!PulsarFunctionE2ESecurityTest,!ServerCnxTest,!AdminApiOffloadTest,!AdminApiSchemaValidationEnforced,!V1_AdminApiTest2,!ProxyPublishConsumeTlsTest,!PulsarFunctionE2ETest,!MessageIdSerialization,!AdminApiTest2,!PulsarFunctionLocalRunTest,!PartitionedProducerConsumerTest,!KafkaProducerSimpleConsumerTest,!MessagePublishThrottlingTest,!ReaderTest,!RackAwareTest,!SimpleProducerConsumerTest,!V1_ProducerConsumerTest,!PersistentFailoverE2ETest,!BrokerClientIntegrationTest,!ReplicatorRateLimiterTest,!PersistentDispatcherFailoverConsumerTest,!AdminApiTest,!V1_AdminApiTest,!CompactionTest,!BatchMessageTest,!PartitionedTopicsSchemaTest' -DfailIfNoTests=false -pl pulsar-broker

- name: package surefire artifacts
if: failure()
run: |
df -h
free -h
rm -rf artifacts
mkdir artifacts
find . -type d -name "*surefire*" -exec cp --parents -R {} artifacts/ \;
zip -r artifacts.zip artifacts
- uses: actions/upload-artifact@master
name: upload surefire-artifacts
if: failure()
with:
name: surefire-artifacts
path: artifacts.zip
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public class PersistentDispatcherFailoverConsumerTest {
final String successTopicName = "persistent://part-perf/global/perf.t1/ptopic";
final String failTopicName = "persistent://part-perf/global/perf.t1/pfailTopic";


@BeforeMethod
public void setup() throws Exception {
ServiceConfiguration svcConfig = spy(new ServiceConfiguration());
Expand Down Expand Up @@ -268,7 +269,7 @@ private void verifyActiveConsumerChange(CommandActiveConsumerChange change,

@Test
public void testConsumerGroupChangesWithOldNewConsumers() throws Exception {
PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentSubscription sub = new PersistentSubscription(topic, "sub-1", cursorMock, false);

int partitionIndex = 0;
Expand Down Expand Up @@ -307,7 +308,7 @@ public void testConsumerGroupChangesWithOldNewConsumers() throws Exception {
public void testAddRemoveConsumer() throws Exception {
log.info("--- Starting PersistentDispatcherFailoverConsumerTest::testAddConsumer ---");

PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentSubscription sub = new PersistentSubscription(topic, "sub-1", cursorMock, false);

int partitionIndex = 4;
Expand Down Expand Up @@ -427,7 +428,7 @@ public void testAddRemoveConsumer() throws Exception {
public void testAddRemoveConsumerNonPartitionedTopic() throws Exception {
log.info("--- Starting PersistentDispatcherFailoverConsumerTest::testAddConsumer ---");

PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentSubscription sub = new PersistentSubscription(topic, "sub-1", cursorMock, false);

// Non partitioned topic.
Expand Down Expand Up @@ -487,7 +488,7 @@ public void testAddRemoveConsumerNonPartitionedTopic() throws Exception {
@Test
public void testMultipleDispatcherGetNextConsumerWithDifferentPriorityLevel() throws Exception {

PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentDispatcherMultipleConsumers dispatcher = new PersistentDispatcherMultipleConsumers(topic, cursorMock, null);
Consumer consumer1 = createConsumer(0, 2, false, 1);
Consumer consumer2 = createConsumer(0, 2, false, 2);
Expand Down Expand Up @@ -531,7 +532,7 @@ public void testMultipleDispatcherGetNextConsumerWithDifferentPriorityLevel() th

@Test
public void testFewBlockedConsumerSamePriority() throws Exception{
PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentDispatcherMultipleConsumers dispatcher = new PersistentDispatcherMultipleConsumers(topic, cursorMock, null);
Consumer consumer1 = createConsumer(0, 2, false, 1);
Consumer consumer2 = createConsumer(0, 2, false, 2);
Expand All @@ -558,7 +559,7 @@ public void testFewBlockedConsumerSamePriority() throws Exception{

@Test
public void testFewBlockedConsumerDifferentPriority() throws Exception {
PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentDispatcherMultipleConsumers dispatcher = new PersistentDispatcherMultipleConsumers(topic, cursorMock, null);
Consumer consumer1 = createConsumer(0, 2, false, 1);
Consumer consumer2 = createConsumer(0, 2, false, 2);
Expand Down Expand Up @@ -612,7 +613,7 @@ public void testFewBlockedConsumerDifferentPriority() throws Exception {

@Test
public void testFewBlockedConsumerDifferentPriority2() throws Exception {
PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService);
PersistentTopic topic = new PersistentTopic(successTopicName + System.currentTimeMillis(), ledgerMock, brokerService);
PersistentDispatcherMultipleConsumers dispatcher = new PersistentDispatcherMultipleConsumers(topic, cursorMock, null);
Consumer consumer1 = createConsumer(0, 2, true, 1);
Consumer consumer2 = createConsumer(0, 2, true, 2);
Expand Down