Skip to content

Tests for shared subscriptions #306

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

Merged
merged 1 commit into from
Feb 3, 2023
Merged

Conversation

sobychacko
Copy link
Collaborator

Resolves #305

@sobychacko sobychacko requested a review from onobc February 2, 2023 01:39
Copy link
Collaborator

@onobc onobc left a comment

Choose a reason for hiding this comment

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

Nice test addition @sobychacko .

A couple of comments to address, but looks great.

Awaitility.await().atMost(Duration.ofSeconds(30)).until(() -> latch2.await(10, TimeUnit.SECONDS));
Awaitility.await().atMost(Duration.ofSeconds(30)).until(() -> latch3.await(10, TimeUnit.SECONDS));

container1.stop();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know in the other listener tests we need to go back and put the resources in try-with-resources. I think it would be a good idea to do this now in this new test while there is only 3 tests in here. Wdyt?

pulsarTemplate.newMessage("hello alice doe").sendAsync();
pulsarTemplate.newMessage("hello buzz doe").sendAsync();

Awaitility.await().atMost(Duration.ofSeconds(30)).until(() -> latch1.await(10, TimeUnit.SECONDS));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should line up the timeouts as in a failure case it will always wait 30s for each of these, rather than 10. I wonder if there is another way we can use Awaitility so that these awaits are not done in serial?

@sobychacko sobychacko merged commit f804771 into spring-projects:main Feb 3, 2023
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.

Adding integration tests for shared subscriptions
2 participants