Skip to content

fix flaky E2E tests failing#1610

Open
JoshVanL wants to merge 35 commits intodapr:masterfrom
JoshVanL:fix-e2e-flakes
Open

fix flaky E2E tests failing#1610
JoshVanL wants to merge 35 commits intodapr:masterfrom
JoshVanL:fix-e2e-flakes

Conversation

@JoshVanL
Copy link
Copy Markdown
Contributor

When dapr receives a termination signal, the app process gets killed without printing "Exited App successfully". The executeAgainstRunningDapr helper previously required this message whenever an app command was present.

Accept "terminated signal received: shutting down" as a valid shutdown path that doesn't require a clean app exit message.

When dapr receives a termination signal, the app process gets killed
without printing "Exited App successfully". The executeAgainstRunningDapr
helper previously required this message whenever an app command was
present.

Accept "terminated signal received: shutting down" as a valid shutdown
path that doesn't require a clean app exit message.

Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL requested review from a team as code owners March 17, 2026 16:22
Copilot AI review requested due to automatic review settings March 17, 2026 16:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the E2E standalone test helper to treat Dapr shutdowns initiated by a termination signal as a valid/expected path, reducing flakiness when the app process is killed before emitting a clean “Exited App successfully” message.

Changes:

  • Detects terminated signal received: shutting down in dapr run output.
  • Treats that termination-signal path as acceptable when determining whether dapr run exited cleanly.
  • Skips the strict requirement for Exited App successfully when shutdown was signal-driven.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: joshvanl <me@joshvanl.dev>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.43%. Comparing base (0e4aa05) to head (27ef36a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1610   +/-   ##
=======================================
  Coverage   15.43%   15.43%           
=======================================
  Files          64       64           
  Lines        7229     7229           
=======================================
  Hits         1116     1116           
  Misses       6027     6027           
  Partials       86       86           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
acroca
acroca previously approved these changes Mar 19, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Mar 19, 2026
@JoshVanL JoshVanL reopened this Mar 19, 2026
@JoshVanL JoshVanL closed this Mar 19, 2026
@JoshVanL JoshVanL reopened this Mar 19, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Mar 20, 2026
@JoshVanL JoshVanL reopened this Mar 20, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Mar 20, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
// NOTE: Do NOT use waitForAppsListed here — dapr list detects
// the daprd process running BEFORE the CLI finishes health
// checks, causing a race where stop is sent too early.
waitForLogContent(t, "../../apps/emit-metrics/.dapr/logs", "daprd", "You're up and running!", 180*time.Second)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we wait for the apps to be healthy?

JoshVanL added 5 commits April 1, 2026 09:23
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Apr 1, 2026
@JoshVanL JoshVanL reopened this Apr 1, 2026
@JoshVanL JoshVanL closed this Apr 1, 2026
@JoshVanL JoshVanL reopened this Apr 1, 2026
@JoshVanL JoshVanL closed this Apr 1, 2026
@JoshVanL JoshVanL reopened this Apr 1, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Apr 2, 2026
@JoshVanL JoshVanL reopened this Apr 2, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Apr 2, 2026
@JoshVanL JoshVanL reopened this Apr 2, 2026
@JoshVanL JoshVanL closed this Apr 2, 2026
@JoshVanL JoshVanL reopened this Apr 2, 2026
@JoshVanL JoshVanL closed this Apr 2, 2026
@JoshVanL JoshVanL reopened this Apr 2, 2026
Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL closed this Apr 2, 2026
@JoshVanL JoshVanL reopened this Apr 2, 2026
JoshVanL added 2 commits April 2, 2026 12:48
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants