Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add unit test for estimateTableRowSize #52144

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

tangenta
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #52085

Problem Summary:

Add unit test for estimateTableRowSize.

What changed and how does it work?

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 27, 2024
Copy link

tiprow bot commented Mar 27, 2024

Hi @tangenta. 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.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Merging #52144 (de6d1b0) into master (b942197) will decrease coverage by 18.4094%.
Report is 64 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52144         +/-   ##
=================================================
- Coverage   72.4092%   53.9999%   -18.4094%     
=================================================
  Files          1487       1679        +192     
  Lines        365652     638345     +272693     
=================================================
+ Hits         264766     344706      +79940     
- Misses        81332     269812     +188480     
- Partials      19554      23827       +4273     
Flag Coverage Δ
integration 36.8477% <ø> (?)
unit 70.4624% <ø> (-1.8392%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (-2.3014%) ⬇️
parser ∅ <ø> (∅)
br 51.1108% <ø> (+4.7815%) ⬆️

@ywqzzy ywqzzy self-requested a review April 3, 2024 04:16
@@ -2217,6 +2217,9 @@ func (w *worker) executeDistTask(t table.Table, reorgInfo *reorgInfo) error {
return err
}

// EstimateTableRowSizeForTest is used for test.
var EstimateTableRowSizeForTest = estimateTableRowSize
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we put it to pkg/ddl/ddl_test.go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we need to access it in realtikvtest package.

Copy link

ti-chi-bot bot commented Apr 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ywqzzy, zimulala

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

Copy link

ti-chi-bot bot commented Apr 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-03 04:22:26.1026931 +0000 UTC m=+417807.630233644: ☑️ agreed by ywqzzy.
  • 2024-04-03 09:03:30.306650876 +0000 UTC m=+434671.834191421: ☑️ agreed by zimulala.

@ti-chi-bot ti-chi-bot bot merged commit 9f505ef into pingcap:master Apr 3, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none 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.

None yet

3 participants