diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-09-28 12:40:27 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-09-28 12:40:27 +0900 |
commit | 49f9543f144f83b3f42d7fc7d39bb5d5fe25ee33 (patch) | |
tree | 83cbff2c935ebea1091764459a3b3e98008a2e07 /sqlite3_go18_test.go | |
parent | use file instead of memory for TestShortTimeout (diff) | |
download | golite-49f9543f144f83b3f42d7fc7d39bb5d5fe25ee33.tar.gz golite-49f9543f144f83b3f42d7fc7d39bb5d5fe25ee33.tar.xz |
fix error handling
close #464
Diffstat (limited to 'sqlite3_go18_test.go')
-rw-r--r-- | sqlite3_go18_test.go | 4 |
1 files 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() } |