Flaky backend tests: billing trial state, 3rd party broker topics, device APIs
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 149
Description
While watching CI on open PRs we hit a batch of test failures that look unrelated to the PR under test (frontend-only change, PR #8467, [run 34595722439](https://github.com/FlowFuse/flowfuse/actions/runs/34595722439)). All 9 failed in the Postgres tests job and passed elsewhere, and the assertions look timing dependent.
* Billing routes > Can suspend/resume a trial project without touching billing (`test/unit/forge/ee/routes/billing/index_spec.js:1453`, expected undefined to be 'starting')
* 3rd Party Broker API > Verify topics all correct (`test/unit/forge/ee/routes/teamBroker/3rdPartyBroker_spec.js:443`)
* 3rd Party Broker API > Get Topics for 3rd Party broker as a Team Owner (`3rdPartyBroker_spec.js:467`)
* 3rd Party Broker API > Add Metadata to a Topic (`3rdPartyBroker_spec.js:485`)
* 3rd Party Broker API > Cannot add metadata to a topic for a broker in a different team (`3rdPartyBroker_spec.js:516`)
* 3rd Party Broker API > Delete Topic (`3rdPartyBroker_spec.js:543`)
* 3rd Party Broker API > Get Topics for team-broker as a Team Owner (`3rdPartyBroker_spec.js:697`, expected [] to have length 1)
* Device API > can unassign from a project (`test/unit/forge/routes/api/device_spec.js:1358`, null read)
* Project/Device API > returns a list of devices for team owner (`test/unit/forge/routes/api/projectDevices_spec.js:168`, expected [] to have length 1)
The broker topic tests failing as a block might share one root cause (broker state not settling before assertions). Might be worth starting there.
Contributor guide
Assessment
This issue has not been assessed yet.