Skip to content

Conversation

@mandarini
Copy link
Contributor

Description

Fixes flaky test failures in functions-js caused by a race condition during Docker container cleanup in CI.

Problem

Tests were intermittently failing in CI with "no such exec instance" errors during teardown. The issue occurred when testcontainers tried to clean up exec processes after the container had already stopped, causing the test suite to fail even though all actual tests passed.

Solution

  • Added a safe stop() method to the Relay class that catches and ignores "no such exec" errors during cleanup
  • Updated all test files to use the new relay.stop() method instead of direct container.stop()
  • Changed runRelay to return a proper Relay instance instead of a plain object

@mandarini mandarini requested review from a team as code owners October 30, 2025 10:16
@mandarini mandarini self-assigned this Oct 30, 2025
@github-actions github-actions bot added the functions-js Related to the functions-js library. label Oct 30, 2025
@mandarini mandarini enabled auto-merge (squash) October 30, 2025 10:25
@mandarini mandarini merged commit 063bfd2 into master Oct 30, 2025
26 checks passed
@mandarini mandarini deleted the test/flaky-functions branch October 30, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions-js Related to the functions-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants