Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Jalina2007
Copy link

Ⅰ. Describe what this PR did

This change adds initial cluster state setup by publishing a ClusterChangeEvent with term=1 at the start of both watch() and watch_withHttp2() tests. It also corrects the HTTP/2 timeout in watch_withHttp2() from 30ms to 30000ms. Before the change, the tests passed in some cases and failed on the others. They passed in sequential builds because watch() would set the server's static state to term=2, causing watch_withHttp2() to receive an immediate response when it requested term=1, making the 30ms timeout look sufficient. In parallel builds or isolated execution, the tests failed (sometimes) because without the cached state, the server would wait for the 2-second delayed event, exceeding the 30ms timeout. By resetting the state to term=1 before each test, both tests now start with an initial baseline and properly validate the long-polling behavior without giving false positives.

Ⅱ. Does this pull request fix one issue?

fixes #7963

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

I’m new here, please let me know if anything in this PR should be done differently

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.81%. Comparing base (dc89be7) to head (7cb3e14).
⚠️ Report is 1 commits behind head on 2.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7969      +/-   ##
============================================
+ Coverage     71.72%   71.81%   +0.09%     
  Complexity      872      872              
============================================
  Files          1300     1300              
  Lines         49727    49727              
  Branches       5908     5908              
============================================
+ Hits          35667    35713      +46     
+ Misses        11122    11083      -39     
+ Partials       2938     2931       -7     

see 16 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

ClusterControllerTest.watch_withHttp2:192 expected: <true> but was: <false>

2 participants