Skip to content

Commit 7ed6449

Browse files
committed
enable pulsar txn coordinator
1 parent 1664a14 commit 7ed6449

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

instrumentation/pulsar/pulsar-2.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/AbstractPulsarClientTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ static void beforeAll() throws PulsarClientException {
8989
new PulsarContainer(DEFAULT_IMAGE_NAME)
9090
.withEnv("PULSAR_MEM", "-Xmx128m")
9191
.withEnv("PULSAR_PREFIX_transactionCoordinatorEnabled", "true")
92-
.withEnv("PULSAR_PREFIX_transactionMetadataStoreProviderClassName", "org.apache.pulsar.transaction.coordinator.impl.InMemTransactionMetadataStoreProvider")
92+
.withEnv(
93+
"PULSAR_PREFIX_transactionMetadataStoreProviderClassName",
94+
"org.apache.pulsar.transaction.coordinator.impl.InMemTransactionMetadataStoreProvider")
95+
.withEnv(
96+
"PULSAR_PREFIX_transactionBufferProviderClassName",
97+
"org.apache.pulsar.broker.transaction.buffer.impl.InMemTransactionBufferProvider")
9398
.withLogConsumer(new Slf4jLogConsumer(logger))
9499
.withStartupTimeout(Duration.ofMinutes(2));
95100
pulsar.start();

instrumentation/pulsar/pulsar-2.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/pulsar/v2_8/PulsarClientTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,13 @@ void testConsumePartitionedTopicUsingBatchReceive() throws Exception {
677677
void testSendMessageWithTxn() throws Exception {
678678
String topic = "persistent://public/default/testSendMessageWithTxn";
679679
admin.topics().createNonPartitionedTopic(topic);
680-
producer = client.newProducer(Schema.STRING).topic(topic)
681-
.sendTimeout(0, TimeUnit.SECONDS).enableBatching(false).create();
680+
producer =
681+
client
682+
.newProducer(Schema.STRING)
683+
.topic(topic)
684+
.sendTimeout(0, TimeUnit.SECONDS)
685+
.enableBatching(false)
686+
.create();
682687
Transaction txn =
683688
client.newTransaction().withTransactionTimeout(5, TimeUnit.SECONDS).build().get();
684689
txn.commit();

0 commit comments

Comments
 (0)