Skip to content

telemetry: migrate test-infra to testify#26540

Merged
ti-chi-bot merged 4 commits intopingcap:masterfrom
tisonkun:issue-26537
Jul 27, 2021
Merged

telemetry: migrate test-infra to testify#26540
ti-chi-bot merged 4 commits intopingcap:masterfrom
tisonkun:issue-26537

Conversation

@tisonkun
Copy link
Contributor

Signed-off-by: tison wander4096@gmail.com

What problem does this PR solve?

Issue Number: close #26537

What is changed and how it works?

  • ctetest for telemetry needs to run alone. Thus I write it a dedicate binary.
  • GetTxnUsageInfo and GetCTEUsageInfo need not to be public, align with other Get* functions.

Release note

  • No release note

Signed-off-by: tison <wander4096@gmail.com>
@ti-chi-bot ti-chi-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 26, 2021
@tisonkun tisonkun requested review from tiancaiamao and xhebox July 26, 2021 02:33
)

var (
GetFeatureUsage = getFeatureUsage
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe get a comment for these two, special keywords maybe. So that we can search it quickly later? I have a suggestion to have both tests with/without _test, to target the problem of access. But it is far from now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what you mean well. Maybe show a patch?

Copy link
Contributor

Choose a reason for hiding this comment

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

like:

// FIXME: EXPORT_TRICK ...
GetFeatureUsage = getFeatureUsage

My suggestion is to have tests splitted in two packages, one with the same package name as the code(no access problem), another is suffixed with _test(can only make use of exported functions). EXPORT_TRICK will be excellent when we want to search for all such tricks. Though it can also be archived by some scripts/source code parsing, we will look through all tests anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For these two line, I tend to write the actual test under telemetry, but it failed with cyclic deps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get your point. You can create an issue to continue the discussion anyway. It provides a best practice for testing which may need a bit more time to see whether or not we really need it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, for now, a mark is enough. Not really necessary though...

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 26, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • tiancaiamao
  • xhebox

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 26, 2021
@tisonkun tisonkun requested a review from tangenta July 27, 2021 02:54
@tisonkun
Copy link
Contributor Author

/cc @mmyj

@ti-chi-bot
Copy link
Member

@tisonkun: GitHub didn't allow me to request PR reviews from the following users: mmyj.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @mmyj

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 ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 27, 2021
@tiancaiamao
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 304f945

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 27, 2021
@ti-chi-bot
Copy link
Member

@tisonkun: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Details

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 ti-community-infra/tichi repository.

@tiancaiamao
Copy link
Contributor

/run-check_dev_2

Still unstable?

[2021-07-27T17:02:23.621Z] The following test cases take too long to finish:
[2021-07-27T17:02:23.621Z] PASS: db_integration_test.go:1340: testIntegrationSuite6.TestCreateTableTooLarge	4.233s
[2021-07-27T17:02:23.621Z] PASS: db_partition_test.go:631: testIntegrationSuite1.TestCreateTableWithListPartition	4.741s
[2021-07-27T17:02:23.621Z] PASS: db_test.go:561: testDBSuite7.TestCancelAddIndex	4.871s
[2021-07-27T17:02:23.621Z] PASS: db_test.go:545: testDBSuite8.TestCancelAddPrimaryKey	4.279s
[2021-07-27T17:02:23.621Z] PASS: infoschema_reader_test.go:236: testInfoschemaTableSuite.TestDataTypesMaxLengthAndOctLength	4.059s
[2021-07-27T17:02:23.621Z] PASS: cte_test.go:244: CTETestSuite.TestCTEWithLimit	5.693s
[2021-07-27T17:02:23.621Z] PASS: join_test.go:1029: testSuiteJoin1.TestInSubquery	4.634s
[2021-07-27T17:02:23.621Z] PASS: partition_table_test.go:2954: testSuiteWithData.TestRangePartitionBoundariesBetweenM	4.753s
[2021-07-27T17:02:23.621Z] PASS: partition_table_test.go:749: partitionTableSuite.TestBatchGetforRangeandListPartitionTable	4.168s
[2021-07-27T17:02:23.621Z] PASS: analyze_test.go:594: testSuite1.TestAnalyzeIncremental	4.831s
[2021-07-27T17:02:23.621Z] PASS: analyze_test.go:169: testSuite1.TestAnalyzeParameters	4.328s
[2021-07-27T17:02:23.621Z] PASS: builtin_string_vec_test.go:521: testVectorizeSuite1.TestVectorizedBuiltinStringEvalOneVec	5.142s
[2021-07-27T17:02:23.621Z] PASS: builtin_time_vec_generated_test.go:6726: testVectorizeSuite1.TestVectorizedBuiltinTimeEvalOneVecGenerated	4.272s
[2021-07-27T17:02:23.621Z] exit status 252

@ti-chi-bot ti-chi-bot merged commit 85cce04 into pingcap:master Jul 27, 2021
@tisonkun tisonkun deleted the issue-26537 branch July 27, 2021 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate test-infra to testify for telemetry pkg

4 participants