mirror of https://github.com/jackc/pgx.git
Tweak test for better travis compat.
parent
f5b269d56a
commit
79acbeac0e
|
@ -366,12 +366,12 @@ func TestPoolAcquireAndReleaseCycleAutoConnect(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Unable to Acquire: %v", err)
|
t.Fatalf("Unable to Acquire: %v", err)
|
||||||
}
|
}
|
||||||
rows, _ := c.Query("select 1")
|
rows, _ := c.Query("select 1, pg_sleep(0.02)")
|
||||||
rows.Close()
|
rows.Close()
|
||||||
pool.Release(c)
|
pool.Release(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 1000; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
doSomething()
|
doSomething()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ func TestPoolAcquireAndReleaseCycleAutoConnect(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
for i := 0; i < 1000; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
Loading…
Reference in New Issue