tidb icon indicating copy to clipboard operation
tidb copied to clipboard

br: Add goleak test for br integration test

Open RidRisR opened this issue 10 months ago • 7 comments

What problem does this PR solve?

Issue Number: close #52696

Problem Summary:

What changed and how does it work?

  1. Add goleak test for br integration tests
  2. Add a 30 seconds expiration time for http idleconnections
  3. reduce the number of http clients in stream_status
  4. clean up some opened rpc clients
  5. ignored some harmless goroutine leaks

Check List

Tests

  • [x] Unit test
  • [x] 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

RidRisR avatar Apr 18 '24 21:04 RidRisR

Hi @RidRisR. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tiprow[bot] avatar Apr 18 '24 21:04 tiprow[bot]

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 73.7697%. Comparing base (1d698c7) to head (a991326). Report is 25 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52741        +/-   ##
================================================
+ Coverage   72.3811%   73.7697%   +1.3886%     
================================================
  Files          1482       1525        +43     
  Lines        428743     449820     +21077     
================================================
+ Hits         310329     331831     +21502     
+ Misses        99115      96795      -2320     
- Partials      19299      21194      +1895     
Flag Coverage Δ
integration 31.3784% <77.7777%> (?)
unit 71.2337% <0.0000%> (+0.0152%) :arrow_up:

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.4749% <77.7777%> (+10.3310%) :arrow_up:

codecov[bot] avatar Apr 19 '24 03:04 codecov[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leavrth, YuJuncen

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

The pull request process is described here

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[bot] avatar Apr 29 '24 06:04 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-04-29 03:40:04.386409276 +0000 UTC m=+242158.143544851: :ballot_box_with_check: agreed by YuJuncen.
  • 2024-04-29 06:32:42.89581257 +0000 UTC m=+252516.652948143: :ballot_box_with_check: agreed by Leavrth.

ti-chi-bot[bot] avatar Apr 29 '24 06:04 ti-chi-bot[bot]

br/pkg/stream/stream_status.go:435:30: method StatusController.Close already declared at br/pkg/stream/stream_status.go:347:30

YuJuncen avatar Apr 29 '24 06:04 YuJuncen

(You may run make bazel_prepare && bazel build //br/pkg/... --//build:with_nogo_flag=true locally to run the static checker)

YuJuncen avatar Apr 29 '24 06:04 YuJuncen

/test

RidRisR avatar Apr 30 '24 06:04 RidRisR

@RidRisR: The /test command needs one or more targets. The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_br_integration_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_lightning_integration_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ti-chi-bot[bot] avatar Apr 30 '24 06:04 ti-chi-bot[bot]

/test pull-br-integration-test

RidRisR avatar Apr 30 '24 06:04 RidRisR

@RidRisR: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tiprow[bot] avatar Apr 30 '24 06:04 tiprow[bot]

@RidRisR: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-br-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tiprow[bot] avatar Apr 30 '24 06:04 tiprow[bot]

/test check-dev2

RidRisR avatar May 06 '24 22:05 RidRisR

@RidRisR: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_br_integration_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_lightning_integration_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test check-dev2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ti-chi-bot[bot] avatar May 06 '24 22:05 ti-chi-bot[bot]

/test check-dev2

RidRisR avatar May 06 '24 22:05 RidRisR