Skip to content

test: use different port number for tests to account for port being in TIME_WAIT state after a process terminates#524

Merged
ttuffin merged 2 commits into
ansible:mainfrom
mkanoor:bump_timeout_60
Mar 12, 2026
Merged

test: use different port number for tests to account for port being in TIME_WAIT state after a process terminates#524
ttuffin merged 2 commits into
ansible:mainfrom
mkanoor:bump_timeout_60

Conversation

@mkanoor
Copy link
Copy Markdown
Contributor

@mkanoor mkanoor commented Mar 11, 2026

When tests run sequentially in CI, the operating system doesn't release port 5000 immediately
after a process terminates. There's a brief period (usually a few seconds) where the port remains
in TIME_WAIT state.
Changed to use separate ports for the tests.

https://github.com/ansible/event-driven-ansible/actions/runs/22968325889/job/66678006614

2026-03-11 18:36:37,191 - ansible_rulebook.app - ERROR - [Errno 48] error while attempting to bind on address (\'0.0.0.0\', 5000): [errno 48] address already in use\n2026-03-11 18:36:37,191 - ansible_rulebook.app - INFO - Main complete\n2026-03-11 18:36:37,191 - drools.dispatch - DEBUG - Shutting down async channel\n2026-03-11 18:36:37,193 - ansible_rulebook.cli - ERROR - Terminating One of the source plugins failed\n'

@mkanoor mkanoor changed the title tests: bump timeout to 60 seconds test: bump timeout to 60 seconds Mar 11, 2026
@mkanoor mkanoor added the chore label Mar 11, 2026
@mkanoor mkanoor changed the title test: bump timeout to 60 seconds test: use different port number for tests to account for port being in TIME_WAIT state after a process terminates Mar 11, 2026
@mkanoor mkanoor requested review from AlexSCorey and kaiokmo March 11, 2026 19:17
kaiokmo
kaiokmo previously approved these changes Mar 11, 2026
The webhook server takes longer than 15 seconds to come up
depending on the load in the servers running the CI.
Increasing the timeout to 60 seconds to see if it performs
better, also log the Exception that is caught

Use distinct port numbers so that we dont run into TIME_WAIT
issues when the TCP stack is still holding on to the port.
@ttuffin ttuffin enabled auto-merge (squash) March 12, 2026 11:14
@ttuffin ttuffin requested a review from a team March 12, 2026 11:14
@ttuffin ttuffin merged commit 50babd4 into ansible:main Mar 12, 2026
18 checks passed
AlexSCorey pushed a commit to AlexSCorey/event-driven-ansible that referenced this pull request Mar 17, 2026
…n TIME_WAIT state after a process terminates (ansible#524)

* test: bump timeout to 60 seconds

The webhook server takes longer than 15 seconds to come up
depending on the load in the servers running the CI.
Increasing the timeout to 60 seconds to see if it performs
better, also log the Exception that is caught

Use distinct port numbers so that we dont run into TIME_WAIT
issues when the TCP stack is still holding on to the port.

* chore: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
AlexSCorey pushed a commit to AlexSCorey/event-driven-ansible that referenced this pull request Mar 17, 2026
…n TIME_WAIT state after a process terminates (ansible#524)

* test: bump timeout to 60 seconds

The webhook server takes longer than 15 seconds to come up
depending on the load in the servers running the CI.
Increasing the timeout to 60 seconds to see if it performs
better, also log the Exception that is caught

Use distinct port numbers so that we dont run into TIME_WAIT
issues when the TCP stack is still holding on to the port.

* chore: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants