From 4483e6378303be14b0585838f32dd5b4b9f0f591 Mon Sep 17 00:00:00 2001 From: Anu Thomas Chandy Date: Tue, 1 Oct 2024 12:04:35 -0700 Subject: [PATCH] Enabling integration/live tests for Event Hubs V2 stack (#41812) --- .../com/azure/messaging/eventhubs/IntegrationTestBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java index 7b89877cfdef9..61cebe59c8409 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/IntegrationTestBase.java @@ -12,6 +12,7 @@ import com.azure.core.test.TestContextManager; import com.azure.core.test.TestMode; import com.azure.core.util.ClientOptions; +import com.azure.core.util.ConfigurationBuilder; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.identity.DefaultAzureCredentialBuilder; @@ -134,7 +135,10 @@ protected EventHubClientBuilder createBuilder(boolean shareConnection) { .retryOptions(RETRY_OPTIONS) .clientOptions(OPTIONS_WITH_TRACING) .transportType(AmqpTransportType.AMQP) - .scheduler(scheduler); + .scheduler(scheduler) + .configuration(new ConfigurationBuilder() + .putProperty("com.azure.messaging.eventhubs.v2", "true") + .build()); final String fullyQualifiedDomainName = TestUtils.getFullyQualifiedDomainName(); final String eventHubName = TestUtils.getEventHubName();