Skip to content

Commit a3323c0

Browse files
authored
fix missing skip test when no DB is available (#1597)
Fix `go test` fails when no DB is set up. (cherry picked from commit 9b8d28e)
1 parent b45a6fc commit a3323c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver_test.go

Lines changed: 3 additions & 0 deletions
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)