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

tests: add integration2 for tools integration tests #56486

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

bb7133
Copy link
Member

@bb7133 bb7133 commented Oct 8, 2024

What problem does this PR solve?

Issue Number: ref #56556

Problem Summary:

Please check #56556.

What changed and how does it work?

This is the first try of #56556. Rather than updating tests/integrationtest, currently I added integrationtest2 so that the existing test scripts/test cases could be stable enough.

In the future, I will try to merge integrationtest2 into integrationtest when this is stable and mature enough.

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

  • NA

Documentation

  • NA

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 8, 2024
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.5504%. Comparing base (df821b9) to head (e6c8220).
Report is 40 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56486         +/-   ##
=================================================
- Coverage   73.2357%   56.5504%   -16.6853%     
=================================================
  Files          1626       1752        +126     
  Lines        448692     636412     +187720     
=================================================
+ Hits         328603     359894      +31291     
- Misses        99977     252351     +152374     
- Partials      20112      24167       +4055     
Flag Coverage Δ
integration 36.7960% <ø> (?)
unit 72.4625% <ø> (+0.0224%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 51.0975% <ø> (+5.6261%) ⬆️

@bb7133 bb7133 changed the title (draft) tests/integrationtest: update script (WIP) tests/integrationtest: update script Oct 9, 2024
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2024
@bb7133
Copy link
Member Author

bb7133 commented Oct 9, 2024

/retest

1 similar comment
@bb7133
Copy link
Member Author

bb7133 commented Oct 9, 2024

/retest

@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 10, 2024
@bb7133 bb7133 changed the title (WIP) tests/integrationtest: update script (WIP) tests: add integration2 for tools integration tests Oct 11, 2024
@bb7133 bb7133 changed the title (WIP) tests: add integration2 for tools integration tests tests: add integration2 for tools integration tests Oct 11, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 11, 2024
br_integration t1 _tidb_rowid 101 _TIDB_ROWID
br_integration t1 _tidb_rowid 1 AUTO_INCREMENT
Destination Size BackupTS Queue Time Execution Time
/tmp/t1_550838d3-0672-45d9-8e57-894755fe0478 3695 453145470351704099 2024-10-11 10:13:06 2024-10-11 10:13:06
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not print this msg, because it has some unstable result

Copy link
Member Author

Choose a reason for hiding this comment

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

I used 'enableResultLog' to control it, now it's gone. Thanks!

pingcap/mysql-tester#133

Destination Size BackupTS Queue Time Execution Time
/tmp/t1_550838d3-0672-45d9-8e57-894755fe0478 3695 453145470351704099 2024-10-11 10:13:06 2024-10-11 10:13:06
Destination Size BackupTS Cluster TS Queue Time Execution Time
/tmp/t1_550838d3-0672-45d9-8e57-894755fe0478 3695 453145470351704099 453145471282315315 2024-10-11 10:13:10 2024-10-11 10:13:10
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

INSERT INTO t2(a, b) VALUES (1, 1), (2, 2), (3, 3);
SELECT (c & 31) as inc FROM t2 ORDER BY inc;

--dump_and_import t2 AS tt2
Copy link
Contributor

Choose a reason for hiding this comment

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

Split it to two commands dump and import is better.

Copy link
Member Author

Choose a reason for hiding this comment

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

I want it to provide an easiest way to performance 'backup' and 'restore' without any detail(for example, the syntax of BACKUP/RESTORE, the arguments of BR binary, local path of backup data...).

For integration tests with more details, many other ways like our internal testing framework can be used.

But still, maybe we can provide two new commands for dump and import.

INSERT INTO t1 (b) VALUES (1), (2), (3);
SHOW TABLE t1 NEXT_ROW_ID;

--backup_and_restore t1 AS tt1
Copy link
Contributor

Choose a reason for hiding this comment

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

Split it to two commands backup and restore is better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ditto as dump and import.

@@ -0,0 +1,91 @@
#! /usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

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

This file seems a little bit unreasonable here.

If we want test it on local env, maybe tiup is a better choose. If we want test it on ci env, maybe add it to ci repo is better.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is a copy of https://github.com/pingcap/tidb/blob/master/br/tests/download_integration_test_binaries.sh

This is used mainly by CI, but I want it available for local env, too.

Also, this script guarantees we always use latest builds for all components, which is hard to archive for TiUP nightly.

Copy link
Contributor

Choose a reason for hiding this comment

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

But this shell always downloads centos7 image which can't work under MacOS env.

Using tiup means that users can manually set up the test environment through tiup.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll refine it later to make it work in MacOS.

Copy link
Contributor

Choose a reason for hiding this comment

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

And better add third_bin path into .gitignore file

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 11, 2024
Copy link

ti-chi-bot bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, hawkingrei

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:
  • OWNERS [Defined2014,hawkingrei]

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 11, 2024
Copy link

ti-chi-bot bot commented Oct 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-11 04:51:47.205026524 +0000 UTC m=+1194462.625239536: ☑️ agreed by hawkingrei.
  • 2024-10-11 06:59:31.690104219 +0000 UTC m=+1202127.110317228: ☑️ agreed by Defined2014.

@bb7133
Copy link
Member Author

bb7133 commented Oct 11, 2024

/retest

@bb7133
Copy link
Member Author

bb7133 commented Oct 11, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 2dc1b98 into pingcap:master Oct 11, 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 Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants