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

Incomplete example code in testing guide #26573

Closed
peterhuba opened this issue Jul 6, 2022 · 2 comments · Fixed by #26580
Closed

Incomplete example code in testing guide #26573

peterhuba opened this issue Jul 6, 2022 · 2 comments · Fixed by #26580

Comments

@peterhuba
Copy link
Contributor

Description

Hello,
Seems like in the example code for starting a Postgres container in https://quarkus.io/guides/getting-started-testing#launching-containers, a call to container.start() is missing. Adding it was needed in my case with a localstack container.
If it's indeed missing, adding it might save some time for others trying something similar.

Implementation ideas

No response

@peterhuba peterhuba added the area/housekeeping Issue type for generalized tasks not related to bugs or enhancements label Jul 6, 2022
@geoand
Copy link
Contributor

geoand commented Jul 6, 2022

Indeed! Would you like to submit a PR for this?

@geoand geoand added area/documentation and removed area/housekeeping Issue type for generalized tasks not related to bugs or enhancements labels Jul 6, 2022
peterhuba referenced this issue in peterhuba/quarkus Jul 6, 2022
Fixes quarkusio#26573
If container.start() is missing, it will fail with "java.lang.IllegalStateException: Mapped port can only be obtained
after the container is started", or can get a NPE at a later phase of execution, if no call to retrieving port info is
made
@peterhuba
Copy link
Contributor Author

Sure, please have a look at #26580

@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jul 6, 2022
@gsmet gsmet modified the milestones: 2.11.0.CR1, 2.10.3.Final Jul 18, 2022
gsmet referenced this issue in gsmet/quarkus Jul 18, 2022
Fixes quarkusio#26573
If container.start() is missing, it will fail with "java.lang.IllegalStateException: Mapped port can only be obtained
after the container is started", or can get a NPE at a later phase of execution, if no call to retrieving port info is
made

(cherry picked from commit 46eb5b7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants