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

server: migrate packetIO related tests to testify #27042

Merged
merged 26 commits into from
Aug 18, 2021
Merged

server: migrate packetIO related tests to testify #27042

merged 26 commits into from
Aug 18, 2021

Conversation

yedamao
Copy link
Contributor

@yedamao yedamao commented Aug 9, 2021

What problem does this PR solve?

Issue Number: close #27041

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 9, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • tangenta
  • 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.

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 release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 9, 2021
@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label Aug 9, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 11, 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.

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 12, 2021
@xhebox
Copy link
Contributor

xhebox commented Aug 12, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: f822e95

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

yedamao commented Aug 12, 2021

/run-all-tests

@yedamao
Copy link
Contributor Author

yedamao commented Aug 12, 2021

/run-build

@yedamao
Copy link
Contributor Author

yedamao commented Aug 12, 2021

/run-check_dev_2

@yedamao
Copy link
Contributor Author

yedamao commented Aug 12, 2021

/run-check_dev_2

@yedamao
Copy link
Contributor Author

yedamao commented Aug 12, 2021

database/sql.(*DB).connectionOpener
database/sql.(*Tx).awaitDone
github.com/dgraph-io/ristretto.(*Cache).processItems
github.com/dgraph-io/ristretto.(*defaultPolicy).processItems
github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1
github.com/pingcap/badger.(*DB).runFlushMemTable
github.com/pingcap/badger.(*DB).updateSize
github.com/pingcap/badger.(*blobGCHandler).run
github.com/pingcap/badger.(*levelsController).runWorker
github.com/pingcap/badger.(*writeWorker).runMergeLSM
github.com/pingcap/badger.(*writeWorker).runWriteLSM
github.com/pingcap/badger.(*writeWorker).runWriteVLog
github.com/pingcap/badger.Open.func4
github.com/pingcap/badger/epoch.(*ResourceManager).collectLoop
github.com/pingcap/tidb/ddl.(*ddl).limitDDLJobs
github.com/pingcap/tidb/ddl.(*delRange).startEmulator
github.com/pingcap/tidb/ddl.(*worker).start
github.com/pingcap/tidb/domain.(*Domain).LoadPrivilegeLoop.func1
github.com/pingcap/tidb/domain.(*Domain).LoadSysVarCacheLoop.func1
github.com/pingcap/tidb/domain.(*Domain).TelemetryReportLoop.func1
github.com/pingcap/tidb/domain.(*Domain).TelemetryRotateSubWindowLoop.func1
github.com/pingcap/tidb/domain.(*Domain).globalBindHandleWorkerLoop.func1
github.com/pingcap/tidb/domain.(*Domain).handleEvolvePlanTasksLoop.func1
github.com/pingcap/tidb/domain.(*Domain).infoSyncerKeeper
github.com/pingcap/tidb/domain.(*Domain).topNSlowQueryLoop
github.com/pingcap/tidb/domain.(*Domain).topologySyncerKeeper
github.com/pingcap/tidb/server.(*Server).Run
github.com/pingcap/tidb/server.NewServer.func1
github.com/pingcap/tidb/store/mockstore/unistore/tikv.(*MVCCStore).StartDeadlockDetection.func1
github.com/pingcap/tidb/store/mockstore/unistore/tikv.(*MVCCStore).runUpdateSafePointLoop
github.com/pingcap/tidb/store/mockstore/unistore/tikv.writeDBWorker.run
github.com/pingcap/tidb/store/mockstore/unistore/tikv.writeLockWorker.run
github.com/pingcap/tidb/util/topsql/tracecpu.(*sqlCPUProfiler).startAnalyzeProfileWorker
github.com/soheilhy/cmux.muxListener.Accept
github.com/tikv/client-go/v2/internal/locate.(*RegionCache).asyncCheckAndResolveLoop
github.com/tikv/client-go/v2/oracle/oracles.(*pdOracle).updateTS
github.com/tikv/client-go/v2/tikv.(*KVStore).runSafePointChecker
github.com/tikv/client-go/v2/tikv.(*KVStore).safeTSUpdater
github.com/tikv/client-go/v2/txnkv/transaction.keepAlive
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop
go.opencensus.io/stats/view.(*worker).start
gopkg.in/natefinch/lumberjack%2ev2.(*Logger).millRun
internal/poll.runtime_pollWait
net/http.(*persistConn).readLoop
net/http.(*persistConn).writeLoop
time.Sleep

goleak detected too many leaked goroutines, should we ignore them all? @tisonkun

@tisonkun
Copy link
Contributor

@yedamao you can find similar discussion on #26712

I'd additionally share that goleak describes how to locate failure tests, you may try to locate them and see whether we can fix in one round. At least log in the tracking issue of server pkg.

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 14, 2021
@yedamao
Copy link
Contributor Author

yedamao commented Aug 14, 2021

/run-check_dev_2

server/main_test.go Outdated Show resolved Hide resolved
@tisonkun
Copy link
Contributor

@xhebox @tangenta would you help on merging this PR?

@yedamao
Copy link
Contributor Author

yedamao commented Aug 17, 2021

I have some trouble with tidbTestSuite.TestGracefulShutdown.

The commit 4d1d72f fixed goroutine leak in TestGracefulShutdown, but it cause tidbTestSuite.TestOnlySocket and tidbTestSuite.TestSocketAndIp not pass. it's weird

On the master branch, run go test for server pkg exclude TestGracefulShutdown
make failpoint-enable && cd server && go test -v --run=TestT -check.exclude=TestGracefulShutdown also failed.

@yedamao
Copy link
Contributor Author

yedamao commented Aug 17, 2021

I'm still digging on this

- set global init_connect to empty to avoid fail other tests
@yedamao
Copy link
Contributor Author

yedamao commented Aug 18, 2021

/run-check_dev_2

@yedamao
Copy link
Contributor Author

yedamao commented Aug 18, 2021

I have some trouble with tidbTestSuite.TestGracefulShutdown.

The commit 4d1d72f fixed goroutine leak in TestGracefulShutdown, but it cause tidbTestSuite.TestOnlySocket and tidbTestSuite.TestSocketAndIp not pass. it's weird

On the master branch, run go test for server pkg exclude TestGracefulShutdown
make failpoint-enable && cd server && go test -v --run=TestT -check.exclude=TestGracefulShutdown also failed.

I found the problem is in tidbTestSuite.TestInitConnect.

// change the init-connect to invalid.
dbt.mustExec(`SET GLOBAL init_connect="invalidstring"`)

the above operation will set some invalid status to the tidbTestSuite's tidbdrv/store field. cause the other tests failed.

fixed:
Add operation to clean up in TestInitConnect set global init_connect to empty to avoid fail other tests. commit d1dd0da

@tisonkun @xhebox @tangenta PTAL

@xhebox
Copy link
Contributor

xhebox commented Aug 18, 2021

Impressive, I think we could merge it now.
/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: d1dd0da

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

@yedamao: 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 8a1e9b9 into pingcap:master Aug 18, 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. sig/sql-infra SIG: SQL Infra size/L Denotes a PR that changes 100-499 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 server/packetio_test.go
5 participants