Skip to content

dpcmanager: increase PNAC DHCP reacquire timeout to avoid flaky tests#5860

Merged
milan-zededa merged 1 commit into
lf-edge:masterfrom
rene:increase-to-go-tests
Apr 24, 2026
Merged

dpcmanager: increase PNAC DHCP reacquire timeout to avoid flaky tests#5860
milan-zededa merged 1 commit into
lf-edge:masterfrom
rene:increase-to-go-tests

Conversation

@rene
Copy link
Copy Markdown
Contributor

@rene rene commented Apr 24, 2026

Description

This PR tries to fix several Go-Tests fails during timeout of dpcmanager_test, like the following:

https://github.com/lf-edge/eve/actions/runs/24859644144/job/72781692997?pr=5854#step:7:3214
https://github.com/lf-edge/eve/actions/runs/24859644144/job/72781692997?pr=5854#step:7:3213

The first-retry Eventually checks in the three PNAC DHCP reacquire tests used a 5s timeout for a reacquire that fires after ~2s backoff. This left only ~1s of margin because the periodic dpcTestTimer (NetworkTestInterval=2s) fires at roughly the same time and blocks the main select loop for another ~2s while running testConnectivityToController. Under CI load (goroutine pressure from preceding tests that do not clean up initTest state), this margin was insufficient, causing TestPNACDHCPReacquireCancelledByNewDPC to time out.

Increase the timeout from 5s to 10s across all three affected tests and add an explanatory comment in the failing test.

🤖 Generated with Claude Code

How to test and validate this PR

Run go-tests from our CI/CD workflows.

Changelog notes

None. This is related to our CI/CD infra.

PR Backports

No backports. See: #5860 (review)

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

The first-retry Eventually checks in the three PNAC DHCP reacquire tests
used a 5s timeout for a reacquire that fires after ~2s backoff. This left
only ~1s of margin because the periodic dpcTestTimer (NetworkTestInterval=2s)
fires at roughly the same time and blocks the main select loop for another
~2s while running testConnectivityToController. Under CI load (goroutine
pressure from preceding tests that do not clean up initTest state), this
margin was insufficient, causing TestPNACDHCPReacquireCancelledByNewDPC to
time out.

Increase the timeout from 5s to 10s across all three affected tests and add
an explanatory comment in the failing test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
@rene rene requested a review from eriknordmark April 24, 2026 11:48
@rene rene requested a review from milan-zededa as a code owner April 24, 2026 11:48
@rene rene added the stable Should be backported to stable release(s) label Apr 24, 2026
Copy link
Copy Markdown
Contributor

@milan-zededa milan-zededa left a comment

Choose a reason for hiding this comment

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

Thanks, and no need to backport, SCEP support is not in 16.0

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.03%. Comparing base (2281599) to head (e7b8608).
⚠️ Report is 580 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5860      +/-   ##
==========================================
- Coverage   19.52%   17.03%   -2.50%     
==========================================
  Files          19      477     +458     
  Lines        3021    85762   +82741     
==========================================
+ Hits          590    14609   +14019     
- Misses       2310    69642   +67332     
- Partials      121     1511    +1390     

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

@milan-zededa milan-zededa merged commit 7d4b21d into lf-edge:master Apr 24, 2026
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable Should be backported to stable release(s)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants