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

structure: migrate test-infra to testify #27219

Merged
merged 6 commits into from
Aug 25, 2021

Conversation

HuGanghui
Copy link
Contributor

@HuGanghui HuGanghui commented Aug 14, 2021

What problem does this PR solve?

Issue Number: close #27139

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 14, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • mmyj
  • tiancaiamao

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.

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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 14, 2021
@HuGanghui HuGanghui force-pushed the testify-structure-27139 branch from bf286eb to 1bd051e Compare August 14, 2021 03:51
@HuGanghui
Copy link
Contributor Author

/cc @tisonkun

@ti-chi-bot ti-chi-bot requested a review from tisonkun August 14, 2021 03:53
@HuGanghui HuGanghui force-pushed the testify-structure-27139 branch from 1bd051e to 5f4e23b Compare August 14, 2021 04:21
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 17, 2021
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @HuGanghui ! Comments inline.

structure/main_test.go Outdated Show resolved Hide resolved
structure/structure_test.go Outdated Show resolved Hide resolved
@HuGanghui HuGanghui force-pushed the testify-structure-27139 branch from ca18232 to 7b4c65d Compare August 17, 2021 12:50
@HuGanghui HuGanghui force-pushed the testify-structure-27139 branch from 7b4c65d to 1deb89d Compare August 17, 2021 12:54
Comment on lines +26 to +29
opts := []goleak.Option{
goleak.IgnoreTopFunction("go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
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 add these code according to other similar PRs to avoid go leak error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you verify that exactly these goroutines don't exit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I do not add those code, when i run this test on my local, goleak: Errors will appear :

--- PASS: TestString (0.29s)
PASS
goleak: Errors on successful test run: found unexpected goroutines:
[Goroutine 53 in state select, with go.opencensus.io/stats/view.(*worker).start on top of the stack:
goroutine 53 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc000527500)
	/Users/hgh/go/pkg/mod/go.opencensus.io@v0.22.5/stats/view/worker.go:276 +0xcd
created by go.opencensus.io/stats/view.init.0
	/Users/hgh/go/pkg/mod/go.opencensus.io@v0.22.5/stats/view/worker.go:34 +0x68

 Goroutine 30 in state chan receive, with go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop on top of the stack:
goroutine 30 [chan receive]:
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc00065e678)
	/Users/hgh/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/pkg/logutil/merge_logger.go:173 +0x3ac
created by go.etcd.io/etcd/pkg/logutil.NewMergeLogger
	/Users/hgh/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/pkg/logutil/merge_logger.go:91 +0x85

 Goroutine 141 in state chan receive, with go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop on top of the stack:
goroutine 141 [chan receive]:
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc00065e9c0)
	/Users/hgh/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/pkg/logutil/merge_logger.go:173 +0x3ac
created by go.etcd.io/etcd/pkg/logutil.NewMergeLogger
	/Users/hgh/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/pkg/logutil/merge_logger.go:91 +0x85

 Goroutine 128 in state chan receive, with go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop on top of the stack:
goroutine 128 [chan receive]:
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc00028d980)
	/Users/hgh/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/pkg/logutil/merge_logger.go:173 +0x3ac
created by go.etcd.io/etcd/pkg/logutil.NewMergeLogger
	/Users/hgh/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/pkg/logutil/merge_logger.go:91 +0x85
]

Process finished with exit code 1

so, Is it necessary to add these code? Or this goleak error actually is expected?

@HuGanghui
Copy link
Contributor Author

/run-check_dev_2

@HuGanghui
Copy link
Contributor Author

I do not know why check_dev_2 failed, please give me some help.

@tisonkun
Copy link
Contributor

@HuGanghui

[2021-08-17T13:18:27.170Z] The following test cases take too long to finish:
[2021-08-17T13:18:27.170Z] PASS: column_type_change_test.go:1002: testColumnTypeChangeSuite.TestColumnTypeChangeFromDateTimeTypeToOthers	5.127s
[2021-08-17T13:18:27.170Z] PASS: cte_test.go:245: CTETestSuite.TestCTEWithLimit	5.401s

see also https://pingcap.github.io/tidb-dev-guide/get-started/write-and-run-unit-tests.html#timeout

We keep improving CI env stability and reduce case duration. So far you can just rerun check_dev_2 as above.

cc @zhouqiang-cl @tiancaiamao

/run-check_dev_2

@HuGanghui
Copy link
Contributor Author

@HuGanghui

[2021-08-17T13:18:27.170Z] The following test cases take too long to finish:
[2021-08-17T13:18:27.170Z] PASS: column_type_change_test.go:1002: testColumnTypeChangeSuite.TestColumnTypeChangeFromDateTimeTypeToOthers	5.127s
[2021-08-17T13:18:27.170Z] PASS: cte_test.go:245: CTETestSuite.TestCTEWithLimit	5.401s

see also https://pingcap.github.io/tidb-dev-guide/get-started/write-and-run-unit-tests.html#timeout

We keep improving CI env stability and reduce case duration. So far you can just rerun check_dev_2 as above.

cc @zhouqiang-cl @tiancaiamao

/run-check_dev_2

ok, I got it.

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link
Member

@tisonkun: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

LGTM

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.

@tisonkun
Copy link
Contributor

/cc @xhebox @tiancaiamao

PTAL

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 25, 2021
@tisonkun
Copy link
Contributor

/cc @mmyj

PTAL. Thanks!

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

In response to this:

/cc @mmyj

PTAL. Thanks!

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
Member

@mmyj mmyj left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label Aug 25, 2021
@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Aug 25, 2021
@mmyj
Copy link
Member

mmyj commented Aug 25, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 13c0abb

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 25, 2021
@HuGanghui
Copy link
Contributor Author

/run-check_dev_2

@mmyj
Copy link
Member

mmyj commented Aug 25, 2021

/rebuild

@ti-chi-bot
Copy link
Member

@HuGanghui: 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.

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.

@ti-chi-bot ti-chi-bot merged commit 1bee2ed into pingcap:master Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 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 structure
5 participants