Skip to content

Commit

Permalink
Merge pull request #1654 from josephschorr/pg-gc-tests
Browse files Browse the repository at this point in the history
Disable the default GC process in PG GC tests
  • Loading branch information
josephschorr authored Nov 16, 2023
2 parents 638511c + ed11d4b commit 010a738
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 010a738

Please sign in to comment.