Skip to content

Commit

Permalink
Enabling integration/live tests for Event Hubs V2 stack
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy committed Sep 11, 2024
1 parent adbd2f7 commit 2b6092f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.messaging.eventhubs.models.EventPosition;
import com.azure.messaging.eventhubs.models.PartitionEvent;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.parallel.Execution;
Expand Down Expand Up @@ -72,6 +73,7 @@ public void receiveEvents() {
* Verifies that we can receive multiple times and each time, the same set is received.
*/
@Test
@Disabled("Pending implementation of v2 synchronous consumer")
public void receiveEventsMultipleTimes() {
// Arrange
final int numberOfEvents = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -127,7 +128,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();
Expand Down

0 comments on commit 2b6092f

Please sign in to comment.