fix(generic): Migrate ServerContainer from deprecated decorator to HttpWaitStrategy#971
Open
jmillxyz wants to merge 2 commits intotestcontainers:mainfrom
Open
fix(generic): Migrate ServerContainer from deprecated decorator to HttpWaitStrategy#971jmillxyz wants to merge 2 commits intotestcontainers:mainfrom
jmillxyz wants to merge 2 commits intotestcontainers:mainfrom
Conversation
Contributor
|
Hi @jmillxyz thanks for the contribution, can you please rebase and I'll take a look? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #971 +/- ##
=======================================
Coverage 79.54% 79.54%
=======================================
Files 15 15
Lines 1281 1281
Branches 151 151
=======================================
Hits 1019 1019
Misses 218 218
Partials 44 44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Tranquility2
approved these changes
Apr 1, 2026
Tranquility2
reviewed
Apr 1, 2026
| @wait_container_is_ready(HTTPError, URLError) | ||
| def _connect(self) -> None: | ||
| # noinspection HttpUrlsUsage | ||
| url = self._create_connection_url() |
Contributor
There was a problem hiding this comment.
Not sure skipping the _create_connection_url is a good idea
Contributor
There was a problem hiding this comment.
Notice it has some logic
def _create_connection_url(self) -> str:
if self._container is None:
raise ContainerStartException("container has not been started")
host = self.get_container_host_ip()
exposed_port = self.get_exposed_port(self.internal_port)
url = f"http://{host}:{exposed_port}"
return url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there, I've seen this deprecation warning in a generic container. This is my first PR in this project; I'm open to any feedback you may have!
Related: #874
Also updates the docs, highlighted in this comment