diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-09-28 12:45:09 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-09-28 12:47:35 +0900 |
commit | c0f3d4135e4bb5e170cd72c0074bba14f6f86d4e (patch) | |
tree | 33e3e367df9f6621f8f8de39e2a83dee64faa88f /sqlite3_go18_test.go | |
parent | fix error handling (diff) | |
download | golite-c0f3d4135e4bb5e170cd72c0074bba14f6f86d4e.tar.gz golite-c0f3d4135e4bb5e170cd72c0074bba14f6f86d4e.tar.xz |
fix broken test
Diffstat (limited to 'sqlite3_go18_test.go')
-rw-r--r-- | sqlite3_go18_test.go | 6 |
1 files 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() } |