carlos / platform Public

fix-427-activator-flake

Fixes #427: TestBounceForNamesTheCause flaked on main (CI shard "rest") with events = [instance restarting (config change) instance stopping].

Why. BounceFor emits the bounce line synchronously, then beginStopLocked starts the stop on its own goroutine, which logs "instance stopping". The test asserted exactly one event, so under load the stop's event could land before the assertion.

Change (test only). The test now asserts the bounce line with its cause is the first event, and that no later event is a second bounce line (any cause, instance or sidecar). No production code changes.

Tested. With a temporary 50 ms sleep before the assertion, the old test fails every run with the CI message and the new one passes. Without the sleep, -count=200 -cpu 1,4 passes; go vet and gofmt clean.

Review: test-only, no Astra review (per the follow-up brief).

Commits 2
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity