Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1437: Check for immediate failure on send #1438

Merged
merged 2 commits into from
Apr 7, 2020

Conversation

garyrussell
Copy link
Contributor

Resolves #1437

The future returned by Producer.send() may have been immediately completed
with an exception; check if future.isDone() and call get() so that any
such exception is propagated to the caller.

I will perform backports after review/merge.

Resolves spring-projects#1437

The future returned by `Producer.send()` may have been immediately completed
with an exception; check if `future.isDone()` and call `get()` so that any
such exception is propagated to the caller.

**I will perform backports after review/merge.**
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

@artembilan
Copy link
Member

Although...
Does Travis failure say anything to you?

ReplyingKafkaTemplateTests > testAggregateOrphansNotStored() FAILED

    org.springframework.kafka.KafkaException at ReplyingKafkaTemplateTests.java:438

        Caused by: java.lang.NullPointerException at ReplyingKafkaTemplateTests.java:438

DefaultKafkaProducerFactoryTests > testProducerClosedAfterBadTransition() FAILED

    java.lang.NullPointerException at DefaultKafkaProducerFactoryTests.java:85

KafkaTemplateTransactionTests > testExecuteInTransactionNewInnerTx() FAILED

    java.lang.NullPointerException at KafkaTemplateTransactionTests.java:518

KafkaTemplateTransactionTests > testDeclarative() FAILED

    java.lang.NullPointerException at KafkaTemplateTransactionTests.java:199

RoutingKafkaTemplateTests > routing() FAILED

    java.lang.NullPointerException at RoutingKafkaTemplateTests.java:55

TransactionalContainerTests > testConsumeAndProduceTransactionKTM() FAILED

    org.mockito.exceptions.verification.VerificationInOrderFailure at TransactionalContainerTests.java:249

TransactionalContainerTests > testConsumeAndProduceTransactionKCTM() FAILED

    org.mockito.exceptions.verification.VerificationInOrderFailure at TransactionalContainerTests.java:249

TransactionalContainerTests > testConsumeAndProduceTransactionKTMManual() FAILED

    org.mockito.exceptions.verification.VerificationInOrderFailure at TransactionalContainerTests.java:249

TransactionalContainerTests > testConsumeAndProduceTransactionExternalTM() FAILED

    org.mockito.exceptions.verification.VerificationInOrderFailure at TransactionalContainerTests.java:455

@garyrussell
Copy link
Contributor Author

Doh...

@artembilan artembilan merged commit ab64398 into spring-projects:master Apr 7, 2020
@artembilan
Copy link
Member

Feel free to back-port.

Thanks

@garyrussell garyrussell deleted the GH-1437 branch April 7, 2020 17:35
@garyrussell
Copy link
Contributor Author

Cherry-picked to all supported branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check For FutureFailure on send (future.isDone())
2 participants