-
Notifications
You must be signed in to change notification settings - Fork 1k
tests: select testdb and use MySQL 8.0 by default #789
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
Conversation
Without the `USE...` in `TestExecuteMultiple` the test panics as the result in `conn_test.go:108` is nil. ``` $ go test ---------------------------------------------------------------------- PANIC: conn_test.go:92: connTestSuite.TestExecuteMultiple ... Panic: runtime error: invalid memory address or nil pointer dereference (PC=0x438592) /usr/lib/golang/src/runtime/panic.go:884 in gopanic /usr/lib/golang/src/runtime/panic.go:260 in panicmem /usr/lib/golang/src/runtime/signal_unix.go:837 in sigpanic conn_test.go:108 in connTestSuite.TestExecuteMultiple.func1 conn.go:273 in Conn.ExecuteMultiple conn_test.go:101 in connTestSuite.TestExecuteMultiple /usr/lib/golang/src/reflect/value.go:370 in Value.Call /home/dvaneeden/go/pkg/mod/github.com/pingcap/[email protected]/check.go:836 in suiteRunner.forkTest.func1 /home/dvaneeden/go/pkg/mod/github.com/pingcap/[email protected]/check.go:730 in suiteRunner.forkCall.func1 /usr/lib/golang/src/runtime/asm_amd64.s:1598 in goexit ---------------------------------------------------------------------- FAIL: conn_test.go:132: connTestSuite.TestExecuteSelectStreaming conn_test.go:170: c.Assert(err, IsNil) ... value *mysql.MyError = &mysql.MyError{Code:0x416, Message:"No database selected", State:"3D000"} ("ERROR 1046 (3D000): No database selected") ---------------------------------------------------------------------- FAIL: conn_test.go:86: connTestSuite.TestFieldList conn_test.go:88: c.Assert(err, IsNil) ... value *mysql.MyError = &mysql.MyError{Code:0x416, Message:"No database selected", State:"3D000"} ("ERROR 1046 (3D000): No database selected") ---------------------------------------------------------------------- FAIL: conn_test.go:38: connTestSuite.TearDownSuite conn_test.go:43: s.testExecute_DropTable(c) conn_test.go:83: c.Assert(err, IsNil) ... value *mysql.MyError = &mysql.MyError{Code:0x416, Message:"No database selected", State:"3D000"} ("ERROR 1046 (3D000): No database selected") OOPS: 18 passed, 3 FAILED, 1 PANICKED --- FAIL: Test (0.46s) FAIL exit status 1 FAIL github.com/go-mysql-org/go-mysql/client 0.465s ```
os: [ ubuntu-22.04, ubuntu-20.04 ] | ||
name: Tests Go ${{ matrix.go }} # This name is used in main branch protection rules | ||
name: Tests Go ${{ matrix.go }} on ${{ matrix.os }} # This name is used in main branch protection rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have "Protect matching branches" for the main branch which is based on full name like "Tests Go 1.18".
If we will use a 5 matrix.go
with a 2 matrix.os
we need to have 10 protection rules.
I suggest supporting only the last 2 or 3 versions of Go.
@lance6716 what do you think about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I created this PR there were 4 Go versions. Now (since 1bd36e6) there are only 3 Go versions. So instead of 4x2=8 there are 3x2=6 matrix combinations.
https://endoflife.date/go shows that only 1.20 and 1.19 are supported upstream (the release policy is on https://go.dev/doc/devel/release)
@dveeden Hi, would you mind I resolve git conflicts directly in your PR? |
Done |
Thanks! we now keep golang, OS of testing image and MySQL all up-to-date |
USE...
inTestExecuteMultiple
the test panics as the result inconn_test.go:108
is nil. This doesn't seem to happen consistently. Seems to happen with both 5.7 and 8.0.actions/setup-go