You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Attempt to connect multiple times because these tests are ran in Drone, where the mysql server may not be immediately available when this test is ran.
54
55
limit:=10
55
56
fori:=0; i<limit; i++ {
57
+
log.Println("Attempting mysql connection...")
56
58
d, err:=sql.Open("mysql", args.MySQLURL)
57
59
iferr==nil {
58
-
db=d
59
-
break
60
+
iferr:=d.Ping(); err==nil {
61
+
db=d
62
+
break
63
+
}
60
64
}
61
65
62
66
<-ticker.C
63
67
}
64
68
deferdb.Close()
65
69
66
-
iferr:=db.Ping(); err!=nil {
67
-
t.Fatal(err)
68
-
}
69
-
70
70
t.Run("The query should return a context.Canceled if it exceeds the timeout", func(t*testing.T) {
0 commit comments