[Tests] Bound integration test cleanup when the cluster is recovering
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
Research direction
Start with tests/Integration/DatabaseCleanupTrait.php:33 and read RebootWorkerTest::waitForClusterAndWorkerToRecover() for the existing recovery pattern. Add a bounded health check before clearAll() and retry once if the first call fails, keeping healthy runs fast. Run make test, make test-integration, and bin/lint.sh; done means cleanup fails with a bounded, clear error during recovery and healthy integration runs retain their current runtime.
Written by the indexing model from the issue text.
Description
Description
tests/Integration/DatabaseCleanupTrait.php:33 calls clearAll() in setUp()
without a bound or retry. If the cluster is unavailable because a compose worker
is still restarting, or a previous run left FDB unhealthy, the FFI call can block
for a long time before the suite reaches another test. #159 added a bounded wait
inside RebootWorkerTest, but this shared trait is used by every integration
test, so the next test can still hang before its own cleanup or assertion runs.
Impact: an integration run can appear to hang instead of failing fast, especially
after a killed container, a host under disk pressure, or a manual
docker compose stop/start. Found during the #159 review (PR #176).
Where to start
- Add a bounded cluster-health wait before
clearAll()(reuse the pattern from
RebootWorkerTest::waitForClusterAndWorkerToRecover(), or a small shared
helper), and retry once when the first call fails. - Alternatively, set a PHPUnit per-test timeout and let a hung test fail with a
clear message rather than blocking the whole suite. - Keep the normal path fast: only wait when the cluster is not available or a
status call fails.
Definition of done
- A test that follows a stopped/restarting worker fails with a bounded,
clear error instead of blockingclearAll(). - A healthy integration run keeps its current runtime.
-
make test,make test-integrationandbin/lint.share green.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 0
- Avg merge
- 10h 4m
- Merged PRs (30d)
- 19
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a 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 crazy-goat/fdb-php
-
good first issue priority:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
crazy-goat/fdb-php#184 ·
Maintainers usually reply within 1 day
-
good first issue priority:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
crazy-goat/fdb-php#182 ·
Maintainers usually reply within 1 day
-
priority:medium type:security
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
crazy-goat/fdb-php#180 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue priority:medium type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
crazy-goat/fdb-php#171 ·
Maintainers usually reply within 1 day
-
good first issue priority:low type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crazy-goat/fdb-php#167 ·
Maintainers usually reply within 1 day
All issues in crazy-goat/fdb-php
Similar issues
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
feature-request-triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Codeinwp/wp-menu-icons#360 ·
-
[Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/blocks-engine#4874 ·
Maintainers usually reply within 1 day
-
Visual COBOL: missing 11.0 and 12.0, and 9.0 date differs from Rocket Software's lifecycle pageOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endoflife-date/endoflife.date#11561 ·
Maintainers usually reply within 1 day