diff --git a/.github/workflows/tck-client-side-filters.yaml b/.github/workflows/tck-client-side-filters.yaml index d07babb7..4a8b1195 100644 --- a/.github/workflows/tck-client-side-filters.yaml +++ b/.github/workflows/tck-client-side-filters.yaml @@ -43,4 +43,4 @@ jobs: run: mvn -B clean install -DskipTests -Dspotbugs.skip=true - name: TCK tests - client side filters - run: JAVA_HOME=$JDK8_PATH mvn -B verify -DskipTests -Prun-tck + run: JAVA_HOME=$JDK8_PATH mvn -B verify -DskipTests -Dmaven.main.skip=true -Dmaven.test.skip=true -Prun-tck diff --git a/.github/workflows/tck-server-side-filters.yaml b/.github/workflows/tck-server-side-filters.yaml index 20ce3b30..2730aec6 100644 --- a/.github/workflows/tck-server-side-filters.yaml +++ b/.github/workflows/tck-server-side-filters.yaml @@ -43,4 +43,4 @@ jobs: run: mvn -B clean install -DskipTests -Dspotbugs.skip=true - name: TCK tests - server side filters - run: JAVA_HOME=$JDK8_PATH mvn -B verify -DskipTests -Prun-tck-server-side-filters + run: JAVA_HOME=$JDK8_PATH mvn -B verify -DskipTests -Dmaven.main.skip=true -Dmaven.test.skip=true -Prun-tck-server-side-filters diff --git a/pulsar-jms/src/test/java/com/datastax/oss/pulsar/jms/VirtualDestinationsConsumerTest.java b/pulsar-jms/src/test/java/com/datastax/oss/pulsar/jms/VirtualDestinationsConsumerTest.java index 99f6fdf8..d612d3a8 100644 --- a/pulsar-jms/src/test/java/com/datastax/oss/pulsar/jms/VirtualDestinationsConsumerTest.java +++ b/pulsar-jms/src/test/java/com/datastax/oss/pulsar/jms/VirtualDestinationsConsumerTest.java @@ -43,8 +43,10 @@ import javax.jms.TextMessage; import javax.jms.Topic; import lombok.extern.slf4j.Slf4j; +import org.apache.pulsar.client.admin.PulsarAdminException; import org.apache.pulsar.client.api.MessageId; import org.apache.pulsar.client.api.SubscriptionType; +import org.awaitility.Awaitility; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.params.ParameterizedTest; @@ -459,14 +461,22 @@ public void testPatternConsumerAddingTopicWithServerSideFilters() throws Excepti // the new topic has server side filters on the jms-queue subscription String topicName = "test-" + prefix + "-" + nextDestinationId; factory.getPulsarAdmin().topics().createNonPartitionedTopic(topicName); + // await that the consumer session creates the subscription, then we update it + Awaitility.await() + .untilAsserted(() -> { + List subs = pulsarContainer + .getAdmin() + .topics().getSubscriptions(topicName); + assertEquals(subs.size(), 1); + assertTrue(subs.contains("jms-queue")); + }); Map subscriptionProperties = new HashMap<>(); subscriptionProperties.put("jms.selector", "keepme=TRUE"); subscriptionProperties.put("jms.filtering", "true"); pulsarContainer - .getAdmin() - .topics() - .updateSubscriptionProperties( - topicName, "jms-queue", subscriptionProperties); + .getAdmin() + .topics() + .updateSubscriptionProperties(topicName, "jms-queue", subscriptionProperties); Queue newDestination = session.createQueue(topicName); TextMessage nextMessage = session.createTextMessage("new");