Skip to content

testutil/integration: fix nightly test#4451

Merged
pinebit merged 1 commit intomainfrom
fix/nightly-dkg-test-error-check
Apr 6, 2026
Merged

testutil/integration: fix nightly test#4451
pinebit merged 1 commit intomainfrom
fix/nightly-dkg-test-error-check

Conversation

@pinebit
Copy link
Copy Markdown
Collaborator

@pinebit pinebit commented Apr 6, 2026

Summary

  • Replace strings.Contains(err.Error(), context.Canceled.Error()) with errors.Is(err, context.Canceled) to properly detect context cancellation through wrapped error chains
  • Add nil error check to prevent panic when dkg.Run returns nil
  • Include the actual error in the panic message for better debuggability

category: bug
ticket: none

… test

Use errors.Is instead of string comparison to properly detect
context.Canceled through wrapped error chains. Also handle nil
error case to prevent panic on err.Error() call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pinebit pinebit requested a review from KaloyanTanev April 6, 2026 14:00
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 6, 2026

@pinebit pinebit changed the title testutil/integration: fix context canceled error check in nightly DKG test testutil/integration: fix nightly test Apr 6, 2026
@pinebit pinebit enabled auto-merge (squash) April 6, 2026 14:01
@pinebit pinebit merged commit e596d69 into main Apr 6, 2026
11 of 14 checks passed
@pinebit pinebit deleted the fix/nightly-dkg-test-error-check branch April 6, 2026 14:10
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.60%. Comparing base (20cfcad) to head (8219111).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4451      +/-   ##
==========================================
+ Coverage   56.55%   56.60%   +0.05%     
==========================================
  Files         245      245              
  Lines       32826    32826              
==========================================
+ Hits        18565    18582      +17     
+ Misses      11898    11888      -10     
+ Partials     2363     2356       -7     

☔ 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.

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.

2 participants