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

POC: Test Templates for Async Message Tests #1815

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

timvahlbrock
Copy link
Contributor

@timvahlbrock timvahlbrock commented Jul 14, 2024

POC Implementation to support TestTemplate notation for consumer tests for async messaging. Currently heavily bodged.

@timvahlbrock
Copy link
Contributor Author

timvahlbrock commented Jul 14, 2024

Aside from the major change in Pact method detection the main issue is that JUnit will currently try to inject the message as a parameter directly, instead of the message context, which will cause the same message being used two times (implemented an assertion to test this).

@timvahlbrock
Copy link
Contributor Author

Maybe JUnit is not able to handle a Parameter provider and a TestTemplateContext Provider on the same extension?

rholshausen added a commit that referenced this pull request Jul 31, 2024
@rholshausen
Copy link
Contributor

I'm getting a lot of test failures with this change. The issue (as you have observed) is that with a test template, there is no test instance. There is lots of places where it tries to resolve something on the test instance.

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.

2 participants