Skip to content

Commit eb71a27

Browse files
committed
fix missing skip test when no DB is available (go-sql-driver#1594)
Fix `go test` fails when no DB is set up. (cherry picked from commit 9b8d28e)
1 parent 4395c45 commit eb71a27

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: driver_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -3539,6 +3539,9 @@ func TestConnectionAttributes(t *testing.T) {
35393539
}
35403540

35413541
func TestErrorInMultiResult(t *testing.T) {
3542+
if !available {
3543+
t.Skipf("MySQL server not running on %s", netAddr)
3544+
}
35423545
// https://github.com/go-sql-driver/mysql/issues/1361
35433546
var db *sql.DB
35443547
if _, err := ParseDSN(dsn); err != errInvalidDSNUnsafeCollation {

0 commit comments

Comments
 (0)