From d93ac2d494623ab98ba488b4ed7c7649c65ee667 Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Sun, 23 Mar 2025 12:47:07 +0530 Subject: [PATCH 1/3] ci: switch back to compose --- .github/workflows/ci.yml | 4 +++- docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04577b9..ed6bc77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,8 @@ jobs: with: go-version: ${{ matrix.go-version }} - name: Stand up Postgres ${{ matrix.pg-version }} - run: docker compose up -d postgres:${{ matrix.pg-version }}-alpine + run: docker compose up -d postgres + env: + POSTGRES_VERSION: ${{ matrix.pg-version }} - name: Run tests run: go test -v -race ./... diff --git a/docker-compose.yml b/docker-compose.yml index 257066d..f010ec9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: postgres: - image: postgres:${POSTGRES_VERSION:-15} + image: postgres:${POSTGRES_VERSION:-17} restart: always command: ["-c", "wal_level=logical", "-c", "max_wal_senders=10", "-c", "max_replication_slots=10"] environment: From cd7a7f74bc7879720ca5daed0fe267de7aa573ef Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Sun, 23 Mar 2025 13:01:14 +0530 Subject: [PATCH 2/3] remove obsolete and switch to alpine --- docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f010ec9..84418df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ -version: "3" services: postgres: - image: postgres:${POSTGRES_VERSION:-17} + image: postgres:${POSTGRES_VERSION:-17}-alpine restart: always command: ["-c", "wal_level=logical", "-c", "max_wal_senders=10", "-c", "max_replication_slots=10"] environment: From a1d90fd50a6fb3b59d0980b8f00e685681b11c41 Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Sun, 23 Mar 2025 13:03:30 +0530 Subject: [PATCH 3/3] remove debug Print --- messageV2_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/messageV2_test.go b/messageV2_test.go index bebd996..9f98fbc 100644 --- a/messageV2_test.go +++ b/messageV2_test.go @@ -1,9 +1,9 @@ package pglogrepl import ( - "fmt" - "github.com/stretchr/testify/suite" "testing" + + "github.com/stretchr/testify/suite" ) func TestLogicalDecodingMessageV2Suite(t *testing.T) { @@ -123,7 +123,6 @@ func (s *streamCommitSuite) Test() { msg[0] = 'c' bigEndian.PutUint32(msg[1:], xid) - fmt.Printf("%+v\n", msg) msg[5] = flags bigEndian.PutUint64(msg[6:], uint64(commitLSN)) bigEndian.PutUint64(msg[14:], uint64(transactionEndLSN))