Skip to content

Commit

Permalink
Disable the default GC process in PG GC tests
Browse files Browse the repository at this point in the history
The GC process is invoked manually, so the default process should be disabled
  • Loading branch information
josephschorr committed Nov 16, 2023
1 parent 638511c commit ed11d4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/datastore/postgres/postgres_shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ import (

const pgSerializationFailure = "40001"

const (
veryLargeGCInterval = 90000 * time.Second
)

// Implement the TestableDatastore interface
func (pgd *pgDatastore) ExampleRetryableError() error {
return &pgconn.PgError{
Expand Down Expand Up @@ -100,6 +104,7 @@ func testPostgresDatastore(t *testing.T, pc []postgresConfig) {
GarbageCollectionTest,
RevisionQuantization(0),
GCWindow(1*time.Millisecond),
GCInterval(veryLargeGCInterval),
WatchBufferLength(1),
MigrationPhase(config.migrationPhase),
))
Expand All @@ -109,6 +114,7 @@ func testPostgresDatastore(t *testing.T, pc []postgresConfig) {
TransactionTimestampsTest,
RevisionQuantization(0),
GCWindow(1*time.Millisecond),
GCInterval(veryLargeGCInterval),
WatchBufferLength(1),
MigrationPhase(config.migrationPhase),
))
Expand All @@ -118,6 +124,7 @@ func testPostgresDatastore(t *testing.T, pc []postgresConfig) {
GarbageCollectionByTimeTest,
RevisionQuantization(0),
GCWindow(1*time.Millisecond),
GCInterval(veryLargeGCInterval),
WatchBufferLength(1),
MigrationPhase(config.migrationPhase),
))
Expand All @@ -127,6 +134,7 @@ func testPostgresDatastore(t *testing.T, pc []postgresConfig) {
ChunkedGarbageCollectionTest,
RevisionQuantization(0),
GCWindow(1*time.Millisecond),
GCInterval(veryLargeGCInterval),
WatchBufferLength(1),
MigrationPhase(config.migrationPhase),
))
Expand Down

0 comments on commit ed11d4b

Please sign in to comment.