server: close sql rows to fix unstable test#30306
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
Don't worry about that this PR is too big to review. It is just remove |
|
when Parallel run test, The port of |
mjonss
left a comment
There was a problem hiding this comment.
LGTM
Just one question about a potentially missed t.Parallel()
4b9f974 to
b6a2cc8
Compare
b6a2cc8 to
88f2685
Compare
88f2685 to
6fcd3f6
Compare
wjhuang2016
left a comment
There was a problem hiding this comment.
Please compare the test time for the server package.
6fcd3f6 to
5ee35b7
Compare
|
/run-check_dev_2 |
|
|
|
Oh, waitUntilServerOnline (waitUntilServerCanConnect) does only do sql.Open, which does not do the connection, it would need db.Ping() to actually make the connection! |
I see, I checked |
|
Will if s.listener, err = net.Listen(tcpProto, addr); err != nil {
return nil, errors.Trace(err)
}server, err := NewServer(cfg, ts.tidbdrv)
require.NoError(t, err) |
|
/hold |
568a6cd to
a1f8c02
Compare
|
@bb7133 @djshow832 PTAL |
server/tidb_test.go
Outdated
There was a problem hiding this comment.
TestSocket need a custom link checker.
(for reference 😃 ) yes, if the |
mjonss
left a comment
There was a problem hiding this comment.
TestOnlySocket fails when I try to run it:
--- FAIL: TestOnlySocket (0.79s)
server_test.go:848:
Error Trace: server_test.go:848
tidb_test.go:769
server_test.go:117
tidb_test.go:760
Error: Not equal:
expected: "root@localhost"
actual : ""
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-root@localhost
+
Test: TestOnlySocket
it is a bug. I have fixed. |
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
|
@bb7133 @djshow832 @mjonss PTAL |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: abf158d |
Signed-off-by: Weizhen Wang wangweizhen@pingcap.com
What problem does this PR solve?
Problem Summary:
What is changed and how it works?
server: fix unstable test by removing parallel in test
Check List
Tests
Side effects
Documentation
Release note