Tests concerning PUTs can't coexist with other JUnit 5 tests with pact-jvm-consumer-junit5_2.12
See original GitHub issueIt would appear that having consumer code that issue PUT requests on Pact’s mock server cause issues if tests co-exist in the same JUnit test class.
I’ve created a simple exemplar project to replicate this issue. To replicate, follow these instructions:
git clone git@github.com:paulspencerwilliams/BugExampleWithPactAndPutRequests.git
./gradlew test -i
git checkout works-with-posts
./gradlew test -i
The second test on the works-with-posts branch would appear to prove this is PUT related.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Tests concerning PUTs can't coexist with other JUnit 5 tests ...
It would appear that having consumer code that issue PUT requests on Pact's mock server cause issues if tests co-exist in the same...
Read more >Maven not running JUnit 5 tests - Stack Overflow
According to the annotation ( import org.junit.jupiter.api.Test ), you are trying to run JUnit 5 tests with Maven. According to the documentation, ...
Read more >JUnit 5 User Guide
The junit5-samples repository hosts a collection of sample projects based on JUnit Jupiter, JUnit Vintage, and other testing frameworks.
Read more >Why Your JUnit 5 Tests Are Not Running Under Maven
There is a very common issue preventing your JUnit 5 tests from running under Maven. In this post, I explain why and provide...
Read more >How to specify test order in JUnit 5 | by Alonso Del Arte
There is no good reason to specify test order in this toy example, other than to illustrate how it's done. We will need...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi guys, just had the same issue with HTTP PATCH, so not only PUT
Hey @minhdoan159, a colleague also discovered the timeout hack, and we’ve temporarily worked around this issue using
@BeforeEach public void pause() throws InterruptedException { Thread.sleep(5000L); }