From c281ee3b61e8ab53ff118866d72618ae8cce582b Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 13 Mar 2017 12:54:22 -0400 Subject: Updating server dependancies. Also adding github.com/jaytaylor/html2text and gopkg.in/gomail.v2 (#5748) --- vendor/github.com/lib/pq/go18_test.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'vendor/github.com/lib/pq/go18_test.go') diff --git a/vendor/github.com/lib/pq/go18_test.go b/vendor/github.com/lib/pq/go18_test.go index 15546d865..5d17e4d92 100644 --- a/vendor/github.com/lib/pq/go18_test.go +++ b/vendor/github.com/lib/pq/go18_test.go @@ -79,10 +79,7 @@ func TestContextCancelExec(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) // Delay execution for just a bit until db.ExecContext has begun. - go func() { - time.Sleep(time.Millisecond * 10) - cancel() - }() + defer time.AfterFunc(time.Millisecond*10, cancel).Stop() // Not canceled until after the exec has started. if _, err := db.ExecContext(ctx, "select pg_sleep(1)"); err == nil { @@ -106,10 +103,7 @@ func TestContextCancelQuery(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) // Delay execution for just a bit until db.QueryContext has begun. - go func() { - time.Sleep(time.Millisecond * 10) - cancel() - }() + defer time.AfterFunc(time.Millisecond*10, cancel).Stop() // Not canceled until after the exec has started. if _, err := db.QueryContext(ctx, "select pg_sleep(1)"); err == nil { @@ -137,10 +131,7 @@ func TestContextCancelBegin(t *testing.T) { } // Delay execution for just a bit until tx.Exec has begun. - go func() { - time.Sleep(time.Millisecond * 10) - cancel() - }() + defer time.AfterFunc(time.Millisecond*10, cancel).Stop() // Not canceled until after the exec has started. if _, err := tx.Exec("select pg_sleep(1)"); err == nil { -- cgit v1.2.3-1-g7c22