MCPcopy
hub / github.com/go-sql-driver/mysql / TestNewConnector

Function TestNewConnector

driver_test.go:3375–3388  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3373}
3374
3375func TestNewConnector(t *testing.T) {
3376 mycnf := configForTests(t)
3377 conn, err := NewConnector(mycnf)
3378 if err != nil {
3379 t.Fatal(err)
3380 }
3381
3382 db := sql.OpenDB(conn)
3383 defer db.Close()
3384
3385 if err := db.Ping(); err != nil {
3386 t.Fatal(err)
3387 }
3388}
3389
3390type slowConnection struct {
3391 net.Conn

Callers

nothing calls this directly

Calls 4

configForTestsFunction · 0.85
NewConnectorFunction · 0.85
PingMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected