Let `Wait.forListeningPorts()` wait on specific ports
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, node.js, typescript
Research direction
Start with packages/testcontainers/src/wait-strategies/wait.ts and packages/testcontainers/src/wait-strategies/host-port-wait-strategy.ts to see how Wait.forListeningPorts() selects exposed ports. Check nearby wait strategy tests for the current behavior, then add coverage for selecting specific ports and for calling it without arguments. Done means selected ports are awaited, while the no-argument call still waits for all exposed ports.
Written by the indexing model from the issue text.
Description
What happens
Wait.forListeningPorts() takes no arguments and waits for every exposed TCP port, both from the host and inside the container. There is no way to wait on a subset.
A container that exposes a port which opens late, opens on demand, or is optional (a debug or metrics port) cannot use the strategy. The choices are to stop exposing the port or to switch to a different wait strategy.
Expected
Wait.forListeningPorts(...ports) waits only for the ports given, and for all exposed ports when called without arguments.
Where
packages/testcontainers/src/wait-strategies/wait.tspackages/testcontainers/src/wait-strategies/host-port-wait-strategy.ts
Notes
- Java has
Wait.forListeningPorts(int... ports). Go haswait.ForListeningPort(port)next towait.ForExposedPort(). - Related: #1108 (listening ports wait with several exposed ports on Podman).
Dependencies
- Nothing blocks this. It can start now.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 274
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 44
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from testcontainers/testcontainers-node
-
enhancement minor
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
testcontainers/testcontainers-node#1539 ·
Maintainers usually reply within 1 day
-
enhancement minor
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
testcontainers/testcontainers-node#1531 ·
Maintainers usually reply within 1 day
-
enhancement minor
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
testcontainers/testcontainers-node#1529 ·
Maintainers usually reply within 1 day
-
enhancement minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
testcontainers/testcontainers-node#1528 ·
Maintainers usually reply within 1 day
-
bug patch
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
testcontainers/testcontainers-node#1526 ·
Maintainers usually reply within 1 day
All issues in testcontainers/testcontainers-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额Possibly taken @wumingzhinu claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
OpenListTeam/OpenList-Worker#125 ·
Maintainers usually reply within 2 days
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
margelo/react-native-vision-camera#4217 ·
Maintainers usually reply within 4 days