From 49f9543f144f83b3f42d7fc7d39bb5d5fe25ee33 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 28 Sep 2017 12:40:27 +0900 Subject: [PATCH] fix error handling close #464 --- sqlite3_go18_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlite3_go18_test.go b/sqlite3_go18_test.go index cca0a1f..695e0b2 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 { + if err != nil && context.DeadlineExceeded { t.Fatal(err) } if ctx.Err() != nil && context.DeadlineExceeded != ctx.Err() { - t.Fatalf("%v", ctx.Err()) + t.Fatalf(ctx.Err()) } rows.Close() }