From c0f3d4135e4bb5e170cd72c0074bba14f6f86d4e Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 28 Sep 2017 12:45:09 +0900 Subject: [PATCH] fix broken test --- sqlite3_go18_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlite3_go18_test.go b/sqlite3_go18_test.go index 695e0b2..57d2e8b 100644 --- a/sqlite3_go18_test.go +++ b/sqlite3_go18_test.go @@ -127,11 +127,11 @@ func TestShortTimeout(t *testing.T) { FROM test_table ORDER BY key2 ASC` rows, err := db.QueryContext(ctx, query) - if err != nil && context.DeadlineExceeded { + if err != nil && err != context.DeadlineExceeded { t.Fatal(err) } - if ctx.Err() != nil && context.DeadlineExceeded != ctx.Err() { - t.Fatalf(ctx.Err()) + if ctx.Err() != nil && ctx.Err() != context.DeadlineExceeded { + t.Fatal(ctx.Err()) } rows.Close() }