From c62e580a625fd048fb0e2e3738c9df7c519db1f1 Mon Sep 17 00:00:00 2001 From: Gustav Karlsson Date: Mon, 11 Mar 2024 16:39:07 +0100 Subject: [PATCH] Prepare for JdbcCustomization tests --- .../scheduler/compatibility/CompatibilityTest.java | 4 ++++ .../compatibility/PostgresqlCompatibilityTest.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/CompatibilityTest.java b/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/CompatibilityTest.java index ed6dac99..322f240b 100644 --- a/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/CompatibilityTest.java +++ b/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/CompatibilityTest.java @@ -81,6 +81,10 @@ public Optional getJdbcCustomization() { return Optional.empty(); } + public Optional getJdbcCustomizationForUTCTimestampTest() { + return Optional.empty(); + } + public abstract boolean commitWhenAutocommitDisabled(); @BeforeEach diff --git a/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/PostgresqlCompatibilityTest.java b/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/PostgresqlCompatibilityTest.java index 6bf57c69..cc92eaea 100644 --- a/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/PostgresqlCompatibilityTest.java +++ b/db-scheduler/src/test/java/com/github/kagkarlsson/scheduler/compatibility/PostgresqlCompatibilityTest.java @@ -1,6 +1,9 @@ package com.github.kagkarlsson.scheduler.compatibility; import com.github.kagkarlsson.scheduler.EmbeddedPostgresqlExtension; +import com.github.kagkarlsson.scheduler.jdbc.JdbcCustomization; +import com.github.kagkarlsson.scheduler.jdbc.PostgreSqlJdbcCustomization; +import java.util.Optional; import javax.sql.DataSource; import org.junit.jupiter.api.extension.RegisterExtension; @@ -33,4 +36,9 @@ public DataSource getDataSource() { public boolean commitWhenAutocommitDisabled() { return false; } + + @Override + public Optional getJdbcCustomizationForUTCTimestampTest() { + return Optional.of(new PostgreSqlJdbcCustomization(false, true)); + } }