Skip to content

fix(tests): refresh CF client after container restart - #152

Merged
anderslindho merged 1 commit into
masterfrom
fix-ci
May 6, 2026
Merged

fix(tests): refresh CF client after container restart#152
anderslindho merged 1 commit into
masterfrom
fix-ci

Conversation

@anderslindho

Copy link
Copy Markdown
Contributor

Docker's ephemeral port mapping reassigns the host port whenever a container is stopped and started. The cf_client fixture captured the original port at class setup; after restart_container / start_container it pointed at a dead port, causing every wait_for_sync attempt to fail silently until the 180-second timeout expired.

Recreating the client from the compose state after each CF restart picks up the new port and lets the tests pass.

Docker's ephemeral port mapping reassigns the host port whenever a
container is stopped and started. The cf_client fixture captured the
original port at class setup; after restart_container / start_container
it pointed at a dead port, causing every wait_for_sync attempt to fail
silently until the 180-second timeout expired.

Recreating the client from the compose state after each CF restart
picks up the new port and lets the tests pass.
@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jacomago jacomago left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Impressive find!

@anderslindho
anderslindho merged commit 6f69ced into master May 6, 2026
23 of 24 checks passed
Comment thread server/tests/test_single_ioc.py
@anderslindho
anderslindho deleted the fix-ci branch May 6, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants