mirror of
https://github.com/jackc/pgx.git
synced 2025-05-07 16:12:08 +00:00
Merge branch 'master' into add-char
This commit is contained in:
commit
3e6ecda14d
@ -1,8 +1,8 @@
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.6.2
|
- 1.7.1
|
||||||
- 1.5.2
|
- 1.6.3
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
# Derived from https://github.com/lib/pq/blob/master/.travis.yml
|
# Derived from https://github.com/lib/pq/blob/master/.travis.yml
|
||||||
@ -37,6 +37,11 @@ before_script:
|
|||||||
- psql -U postgres -c "create user pgx_md5 SUPERUSER PASSWORD 'secret'"
|
- psql -U postgres -c "create user pgx_md5 SUPERUSER PASSWORD 'secret'"
|
||||||
- psql -U postgres -c "create user pgx_pw SUPERUSER PASSWORD 'secret'"
|
- psql -U postgres -c "create user pgx_pw SUPERUSER PASSWORD 'secret'"
|
||||||
|
|
||||||
|
install:
|
||||||
|
- go get -u github.com/shopspring/decimal
|
||||||
|
- go get -u gopkg.in/inconshreveable/log15.v2
|
||||||
|
- go get -u github.com/jackc/fake
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -v -race -short ./...
|
- go test -v -race -short ./...
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
@ -1282,7 +1282,7 @@ func TestConnQueryDatabaseSQLDriverValuer(t *testing.T) {
|
|||||||
}
|
}
|
||||||
var num decimal.Decimal
|
var num decimal.Decimal
|
||||||
|
|
||||||
err = conn.QueryRow("select $1::decimal", expected).Scan(&num)
|
err = conn.QueryRow("select $1::decimal", &expected).Scan(&num)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Scan failed: %v", err)
|
t.Fatalf("Scan failed: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user