Skip to content

test(cassandra): fix port collision in certification tests#4284

Open
stywzn wants to merge 3 commits intodapr:mainfrom
stywzn:fix/cassandra-port-collision
Open

test(cassandra): fix port collision in certification tests#4284
stywzn wants to merge 3 commits intodapr:mainfrom
stywzn:fix/cassandra-port-collision

Conversation

@stywzn
Copy link
Copy Markdown

@stywzn stywzn commented Mar 14, 2026

Description

This PR fixes the flaky certification tests for the Cassandra state store, specifically the port collision issue when starting the second sidecar (cassandra-sidecar-dockerDefault2).

Previously, the tests requested 2 free ports and used hardcoded mathematical offsets (+2, +4) to assign ports for subsequent sidecars. In highly concurrent CI environments, these blindly guessed ports are often already in use by other processes, leading to address already in use fatal errors and test failures.

This has been resolved by properly requesting the exact number of required free ports (6 for TestCassandra, 4 for TestCluster) directly from the OS, eliminating the anti-pattern of hardcoded port increments.

Fixes #4179


(Note: I have signed off on my commits.)

Signed-off-by: stywzn <jhonynnis@gmail.com>
@stywzn stywzn requested review from a team as code owners March 14, 2026 06:29
Copy link
Copy Markdown
Contributor

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!!

@sicoyle sicoyle added automerge autoupdate automatically keeps PR up to date against master labels Mar 16, 2026
@stywzn
Copy link
Copy Markdown
Author

stywzn commented Mar 16, 2026

Hi @sicoyle, the Build, Lint, Unit Test CI failed due to an unrelated flaky test in TestPostgresConfigurationWithIAM (configuration/postgres/postgres_test.go: FATAL: password authentication failed for user "testuser").

Since my changes are strictly isolated to fixing the Cassandra port collision, could you please help re-trigger the failing CI workflows? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge autoupdate automatically keeps PR up to date against master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.17] flakey certification tests - state.cassandra

3 participants