diff --git a/pool_test.go b/pool_test.go index 0387dfa..a313568 100644 --- a/pool_test.go +++ b/pool_test.go @@ -681,7 +681,7 @@ func TestPoolStatSuccessfulAcquireCounters(t *testing.T) { stat := pool.Stat() assert.Equal(t, int64(1), stat.AcquireCount()) assert.Equal(t, int64(1), stat.EmptyAcquireCount()) - assert.True(t, stat.AcquireDuration() > 0, "expected stat.AcquireDuration() > 0 but %v", stat.AcquireDuration()) + assert.Positive(t, stat.AcquireDuration(), "expected stat.AcquireDuration() > 0 but %v", stat.AcquireDuration()) assert.Equal(t, stat.EmptyAcquireWaitTime(), stat.AcquireDuration()) lastAcquireDuration := stat.AcquireDuration() @@ -692,8 +692,8 @@ func TestPoolStatSuccessfulAcquireCounters(t *testing.T) { stat = pool.Stat() assert.Equal(t, int64(2), stat.AcquireCount()) assert.Equal(t, int64(1), stat.EmptyAcquireCount()) - assert.True(t, stat.AcquireDuration() > lastAcquireDuration) - assert.True(t, stat.EmptyAcquireWaitTime() < stat.AcquireDuration()) + assert.Greater(t, stat.AcquireDuration(), lastAcquireDuration) + assert.Less(t, stat.EmptyAcquireWaitTime(), stat.AcquireDuration()) lastAcquireDuration = stat.AcquireDuration() wg := &sync.WaitGroup{} @@ -713,8 +713,8 @@ func TestPoolStatSuccessfulAcquireCounters(t *testing.T) { stat = pool.Stat() assert.Equal(t, int64(4), stat.AcquireCount()) assert.Equal(t, int64(2), stat.EmptyAcquireCount()) - assert.True(t, stat.AcquireDuration() > lastAcquireDuration) - assert.True(t, stat.EmptyAcquireWaitTime() < stat.AcquireDuration()) + assert.Greater(t, stat.AcquireDuration(), lastAcquireDuration) + assert.Less(t, stat.EmptyAcquireWaitTime(), stat.AcquireDuration()) lastAcquireDuration = stat.AcquireDuration() }