From bf1cc4dbac6b3982f9c7ec4bc6aba50602a25ffc Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Wed, 5 Oct 2016 08:42:30 -0500 Subject: [PATCH] Fix test for new named ErrAcquireTimeout --- conn_pool_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conn_pool_test.go b/conn_pool_test.go index 2163f515..71a361a6 100644 --- a/conn_pool_test.go +++ b/conn_pool_test.go @@ -276,8 +276,8 @@ func TestPoolWithAcquireTimeoutSet(t *testing.T) { // ... then try to consume 1 more. It should fail after a short timeout. _, timeTaken, err := acquireWithTimeTaken(pool) - if err == nil || err.Error() != "Timeout: All connections in pool are busy" { - t.Fatalf("Expected error to be 'Timeout: All connections in pool are busy', instead it was '%v'", err) + if err == nil || err != pgx.ErrAcquireTimeout { + t.Fatalf("Expected error to be pgx.ErrAcquireTimeout, instead it was '%v'", err) } if timeTaken < connAllocTimeout { t.Fatalf("Expected connection allocation time to be at least %v, instead it was '%v'", connAllocTimeout, timeTaken)