Skip to content

Enhance tests for newly added transaction support #661

@onobc

Description

@onobc
          Here are the subsequent items that need to be completed cc: @jonas-grgt : 
  • The PulsarListenerTxnTests already have tests for a @PulsarListener wrapped w/ @Transactional.
    It would be a good idea to extend/add to these tests by having some transactional JPA access in the listener method and making sure rollbacks do what we expect.

  • The PulsarTemplateLocalTransactionTests already tests local transactions and the other txn tests for the container all use the template in the listen method to make sure all rollback/commit work as expected for the consume-apply-publish use case. However, I think it would be a good idea to add a PulsarTemplateTransactionTests that create a service w/ methods marked @Transactional and verify that usage of a PulsarTemplate in those business method enlists in that outer transaction.

  • Tests for the newly introduced transaction.* package

  • The MethodPulsarListenerEndpoint#validateAndAdjustTransactionSettings needs tests (here)

  • TransactionProperties + TransactionSettings need basic sanity unit tests
    specifically determineTransactionDefinition()

  • DefaultPulsarMessageListenerContainer#validateTransactionSettings needs check for "custom errorHandler w/ transactions not supported" (here)

  • Assert that AckUtils are being called as expected in DefaultPulsarMessageListenerContainerTxnTests at batchListenerUsesBatchAckWhenSharedSub and batchListenerUsesCumulativeAckWhenNotSharedSub

Originally posted by @onobc in #27 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions