From 0c1969dd302bb31b5dabb8fc4e8f0051f7d29833 Mon Sep 17 00:00:00 2001 From: Tommy Ludwig <8924140+shakuzen@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:43:46 +0900 Subject: [PATCH] Fix subscription name format A feature added in the client now validates the subscription name format when dispatching messages as a side effect, even if that feature isn't enabled. Uses a correctly formatted subscription name in the test. --- .../java/zipkin2/collector/pubsub/PubSubCollectorTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collector-pubsub/src/test/java/zipkin2/collector/pubsub/PubSubCollectorTest.java b/collector-pubsub/src/test/java/zipkin2/collector/pubsub/PubSubCollectorTest.java index c03fa1c..1659b9b 100644 --- a/collector-pubsub/src/test/java/zipkin2/collector/pubsub/PubSubCollectorTest.java +++ b/collector-pubsub/src/test/java/zipkin2/collector/pubsub/PubSubCollectorTest.java @@ -14,6 +14,7 @@ import com.google.api.gax.rpc.FixedTransportChannelProvider; import com.google.api.gax.rpc.TransportChannel; import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.pubsub.v1.SubscriptionName; import io.grpc.ManagedChannel; import io.grpc.Server; import io.grpc.inprocess.InProcessChannelBuilder; @@ -76,7 +77,7 @@ class PubSubCollectorTest { FlowControlSettings.newBuilder().setMaxOutstandingElementCount(1000L).build()); collector = new PubSubCollector.Builder() - .subscription("projects/test-project/topics/test-subscription") + .subscription(SubscriptionName.format("test-project", "test-subscription")) .storage(store) .encoding(Encoding.JSON) .executorProvider(executorProvider)