Skip to content

Commit 2c838a0

Browse files
committed
Upgrade tested version of CockroachDB to v25.4.4
1 parent 8f58862 commit 2c838a0

7 files changed

Lines changed: 14 additions & 3 deletions

File tree

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ services:
9393
POSTGRES_HOSTNAME: localhost
9494

9595
cockroachdb:
96-
image: cockroachdb/cockroach:v24.3.3
96+
image: cockroachdb/cockroach:v25.4.4
9797
restart: unless-stopped
9898
network_mode: service:app
9999
command: start-single-node --insecure --listen-addr=127.0.0.1:26257 --store=type=mem,size=1024MiB

batch_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,8 @@ func TestSendBatchStatementTimeout(t *testing.T) {
10331033
defer cancel()
10341034

10351035
pgxtest.RunWithQueryExecModes(ctx, t, defaultConnTestRunner, nil, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
1036+
pgxtest.SkipCockroachDB(t, conn, "CockroachDB does not recover connection after batch statement timeout")
1037+
10361038
batch := &pgx.Batch{}
10371039
batch.Queue("SET statement_timeout='1ms'")
10381040
batch.Queue("SELECT pg_sleep(10)")

ci/setup_test.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ fi
4242

4343
if [[ "${PGVERSION-}" =~ ^cockroach ]]
4444
then
45-
wget -qO- https://binaries.cockroachdb.com/cockroach-v24.3.3.linux-amd64.tgz | tar xvz
46-
sudo mv cockroach-v24.3.3.linux-amd64/cockroach /usr/local/bin/
45+
wget -qO- https://binaries.cockroachdb.com/cockroach-v25.4.4.linux-amd64.tgz | tar xvz
46+
sudo mv cockroach-v25.4.4.linux-amd64/cockroach /usr/local/bin/
4747
cockroach start-single-node --insecure --background --listen-addr=localhost
4848
cockroach sql --insecure -e 'create database pgx_test'
4949
fi

query_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func TestConnQueryValuesWhenUnableToDecode(t *testing.T) {
195195

196196
func TestConnQueryValuesWithUnregisteredOID(t *testing.T) {
197197
t.Parallel()
198+
skipCockroachDB(t, "CockroachDB auto commits DDL by default")
198199

199200
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
200201
defer cancel()
@@ -222,6 +223,7 @@ func TestConnQueryValuesWithUnregisteredOID(t *testing.T) {
222223

223224
func TestConnQueryArgsAndScanWithUnregisteredOID(t *testing.T) {
224225
t.Parallel()
226+
skipCockroachDB(t, "CockroachDB auto commits DDL by default")
225227

226228
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
227229
defer cancel()

stdlib/sql_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,8 @@ func TestConnBeginTxReadOnly(t *testing.T) {
745745

746746
func TestBeginTxContextCancel(t *testing.T) {
747747
testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {
748+
skipCockroachDB(t, db, "CockroachDB auto commits DDL by default")
749+
748750
_, err := db.Exec("drop table if exists t")
749751
require.NoError(t, err)
750752

@@ -1408,6 +1410,8 @@ func TestOpenTransactionsDiscarded(t *testing.T) {
14081410
db := openDB(t)
14091411
defer closeDB(t, db)
14101412

1413+
skipCockroachDB(t, db, "CockroachDB auto commits DDL by default")
1414+
14111415
db.SetMaxOpenConns(1)
14121416
ctx := context.Background()
14131417

tracelog/tracelog_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ func TestLogBatchStatementsOnExec(t *testing.T) {
339339
}
340340

341341
pgxtest.RunWithQueryExecModes(ctx, t, ctr, nil, func(ctx context.Context, t testing.TB, conn *pgx.Conn) {
342+
pgxtest.SkipCockroachDB(t, conn, "CockroachDB auto commits DDL by default")
343+
342344
logger.Clear() // Clear any logs written when establishing connection
343345

344346
batch := &pgx.Batch{}

tx_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ func TestBeginFuncRollbackOnError(t *testing.T) {
356356

357357
func TestBeginReadOnly(t *testing.T) {
358358
t.Parallel()
359+
skipCockroachDB(t, "CockroachDB auto commits DDL by default")
359360

360361
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
361362
defer closeConn(t, conn)

0 commit comments

Comments
 (0)