Skip to content

br: use random port to avoid flaky test#65186

Merged
ti-chi-bot[bot] merged 2 commits into
pingcap:masterfrom
hawkingrei:65185
Dec 24, 2025
Merged

br: use random port to avoid flaky test#65186
ti-chi-bot[bot] merged 2 commits into
pingcap:masterfrom
hawkingrei:65185

Conversation

@hawkingrei

@hawkingrei hawkingrei commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #65185

Problem Summary:

What changed and how does it work?

use random port to avoid flaky test

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Dec 23, 2025
}

addr := ":0"
lis, err = net.Listen("tcp", addr)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we have used a library freeport.GetFreePort()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's also an option, but if it can be accomplished using only the official libraries, it's better not to introduce third-party libraries.

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 23, 2025
@codecov

codecov Bot commented Dec 23, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.1906%. Comparing base (9aa2287) to head (affe18b).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #65186        +/-   ##
================================================
+ Coverage   70.7525%   71.1906%   +0.4380%     
================================================
  Files          1895       1901         +6     
  Lines        518128     518474       +346     
================================================
+ Hits         366589     369105      +2516     
+ Misses       127031     124966      -2065     
+ Partials      24508      24403       -105     
Flag Coverage Δ
integration 48.1016% <ø> (-0.0652%) ⬇️
unit 65.9977% <ø> (+0.4852%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 58.5576% <ø> (+0.3290%) ⬆️
🚀 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.

@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest


addr := ":0"
lis, err = net.Listen("tcp", addr)
t.Log(err)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should use require.NoError?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 23, 2025
@ti-chi-bot

ti-chi-bot Bot commented Dec 23, 2025

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2025-12-23 09:05:36.434585826 +0000 UTC m=+2155081.248363398: ☑️ agreed by xhebox.
  • 2025-12-23 14:10:57.531653023 +0000 UTC m=+2173402.345430596: ☑️ agreed by lance6716.

@lance6716 lance6716 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/hold

free to unhold after addressing comments

}
addr := ":0"
lis, err = net.Listen("tcp", addr)
t.Log(err)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@ti-chi-bot ti-chi-bot Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 23, 2025
@lance6716

Copy link
Copy Markdown
Contributor

/cc @BornChanger

@ti-chi-bot
ti-chi-bot Bot requested a review from BornChanger December 23, 2025 14:11
@ti-chi-bot

ti-chi-bot Bot commented Dec 24, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, Leavrth, xhebox

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Dec 24, 2025
*
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei

Copy link
Copy Markdown
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 24, 2025
@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

3 similar comments
@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

@hawkingrei

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot
ti-chi-bot Bot merged commit 781da15 into pingcap:master Dec 24, 2025
30 checks passed
Reminiscent pushed a commit to Reminiscent/tidb that referenced this pull request Jan 14, 2026
@ti-chi-bot ti-chi-bot Bot added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Jul 24, 2026
@ti-chi-bot

Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #70012.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants