Skip to content

Commit

Permalink
Force close pscProducer in testTransactionalProducerWithKafkaBackendC…
Browse files Browse the repository at this point in the history
…annotBeNonTransactional after 1 second
  • Loading branch information
jeffxiang committed Dec 13, 2024
1 parent 7406f35 commit e30306f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public void testTransactionalProducerWithKafkaBackendCannotBeNonTransactional()
PscProducerMessage<Integer, Integer> producerMessage = new PscProducerMessage<>(topicUriStr1, 0);
Exception e = assertThrows(ProducerException.class, () -> pscProducer.send(producerMessage));
assertEquals(IllegalStateException.class, e.getCause().getClass());
pscProducer.close();
pscProducer.close(Duration.ofSeconds(1));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ public void flush() throws ProducerException {
*/
@Override
public void close() throws IOException {
close(Duration.ofMillis(0L));
close(Duration.ofMillis(Long.MAX_VALUE));
}

/**
Expand Down

0 comments on commit e30306f

Please sign in to comment.