Repository navigation
test: use a free port in the pubsub integration tests - #1845
Open
javier-aliaga wants to merge 1 commit into
Open
javier-aliaga wants to merge 1 commit into
javier-aliaga wants to merge 1 commit into
Conversation
DaprPubSubIT and DaprPubSubOutboxIT picked a random port between 8000 and 8999. DaprSpringMessagingIT runs Spring Boot on 8080 in the same JVM and its cached context keeps the port open, so DaprPubSubIT fails with "Port 8080 is already in use" when it draws 8080. Ask the OS for a free port with the existing DaprContainerFactory.allocateFreePort() instead. Signed-off-by: Javier Aliaga <javier@diagrid.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1845 +/- ##
=========================================
Coverage 79.69% 79.69%
Complexity 2687 2687
=========================================
Files 267 267
Lines 7933 7933
Branches 842 842
=========================================
Hits 6322 6322
Misses 1255 1255
Partials 356 356 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
DaprPubSubITandDaprPubSubOutboxITpicked a random port between 8000 and 8999 for the Spring Boot app.DaprSpringMessagingITruns Spring Boot on a fixed 8080 in the same JVM, and its cached Spring context keeps that port open. WhenDaprPubSubITdrew 8080, all 8 of its tests failed withPort 8080 is already in use.This happened in dapr/dapr's
dapr-test-sdkrun: https://github.com/dapr/dapr/actions/runs/38477497349Both tests now ask the OS for a free port with
DaprContainerFactory.allocateFreePort(), which already existed and is now public.DaprPubSubOutboxITis disabled (#1603) but had the same code, so it is fixed too.Issue reference
No issue. CI flake.
Checklist
Verified locally:
DaprSpringMessagingITandDaprPubSubITrun together in one JVM, 9/9 pass,DaprPubSubITon an OS-assigned port.