Skip to content
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

Fix tests for go1.13 #266

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions driver_test.go
Expand Up @@ -136,6 +136,7 @@ func teardown() error {
}

func TestMain(m *testing.M) {
flag.Parse()
signal.Ignore(syscall.SIGQUIT)
if value := os.Getenv("SKIP_SETUP"); value != "" {
os.Exit(m.Run())
Expand Down Expand Up @@ -1966,9 +1967,3 @@ func TestClientSessionKeepAliveParameter(t *testing.T) {
}
defer rows.Close()
}

func init() {
if !flag.Parsed() {
flag.Parse()
}
}
4 changes: 2 additions & 2 deletions ocsp_test.go
Expand Up @@ -275,13 +275,13 @@ func TestUnitEncodeCertID(t *testing.T) {
}

func getCert(addr string) []*x509.Certificate {
tcpConn, err := net.DialTimeout("tcp", addr, 4*time.Second)
tcpConn, err := net.DialTimeout("tcp", addr, 40*time.Second)
if err != nil {
panic(err)
}
defer tcpConn.Close()

err = tcpConn.SetDeadline(time.Now().Add(1 * time.Second))
err = tcpConn.SetDeadline(time.Now().Add(10 * time.Second))
if err != nil {
panic(err)
}
Expand Down