diff --git a/pom.xml b/pom.xml index dc93008e7..56bada2a9 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,7 @@ providers/jdbc/shedlock-test-support-jdbc providers/jdbc/shedlock-provider-jdbc-internal providers/jdbc/shedlock-provider-jdbc + providers/jdbc/shedlock-provider-jooq providers/jdbc/shedlock-provider-jdbc-template providers/jdbc/shedlock-provider-jdbc-micronaut providers/r2dbc/shedlock-provider-r2dbc diff --git a/providers/jdbc/shedlock-provider-jooq/pom.xml b/providers/jdbc/shedlock-provider-jooq/pom.xml new file mode 100644 index 000000000..363e5d75b --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/pom.xml @@ -0,0 +1,58 @@ + + + + shedlock-parent + net.javacrumbs.shedlock + 5.0.0-SNAPSHOT + ../../../pom.xml + + 4.0.0 + + shedlock-provider-jooq + 5.0.0-SNAPSHOT + + + + net.javacrumbs.shedlock + shedlock-core + ${project.version} + + + + org.jooq + jooq + 3.17.5 + + + + net.javacrumbs.shedlock + shedlock-test-support-jdbc + ${project.version} + test + + + ch.qos.logback + logback-classic + ${logback.ver} + test + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + + net.javacrumbs.shedlock.provider.jooq + + + + + + + + diff --git a/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/JooqLockProvider.java b/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/JooqLockProvider.java new file mode 100644 index 000000000..3d6811b00 --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/JooqLockProvider.java @@ -0,0 +1,27 @@ +/** + * Copyright 2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.support.StorageBasedLockProvider; +import net.javacrumbs.shedlock.support.annotation.NonNull; +import org.jooq.DSLContext; + + +public class JooqLockProvider extends StorageBasedLockProvider { + public JooqLockProvider(@NonNull DSLContext dslContext) { + super(new JooqStorageAccessor(dslContext)); + } +} diff --git a/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/JooqStorageAccessor.java b/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/JooqStorageAccessor.java new file mode 100644 index 000000000..4d7649d5c --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/JooqStorageAccessor.java @@ -0,0 +1,79 @@ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.core.LockConfiguration; +import net.javacrumbs.shedlock.support.AbstractStorageAccessor; +import net.javacrumbs.shedlock.support.annotation.NonNull; +import org.jooq.DSLContext; +import org.jooq.Field; +import org.jooq.Record; +import org.jooq.TableField; +import org.jooq.types.DayToSecond; + +import java.io.Serializable; +import java.time.Duration; +import java.time.LocalDateTime; +import java.util.Map; + +import static net.javacrumbs.shedlock.provider.jooq.Shedlock.SHEDLOCK; +import static org.jooq.impl.DSL.currentLocalDateTime; +import static org.jooq.impl.DSL.inline; +import static org.jooq.impl.DSL.localDateTimeAdd; +import static org.jooq.impl.DSL.when; + +class JooqStorageAccessor extends AbstractStorageAccessor { + private final DSLContext dslContext; + private final Shedlock t = SHEDLOCK; + + JooqStorageAccessor(DSLContext dslContext) { + this.dslContext = dslContext; + } + + @Override + public boolean insertRecord(@NonNull LockConfiguration lockConfiguration) { + return dslContext.transactionResult(tx -> tx.dsl().insertInto(t) + .set(data(lockConfiguration)) + .onConflictDoNothing() + .execute() > 0); + } + + @Override + public boolean updateRecord(@NonNull LockConfiguration lockConfiguration) { + return dslContext.transactionResult(tx -> tx.dsl().update(t) + .set(data(lockConfiguration)) + .where(t.NAME.eq(lockConfiguration.getName()).and(t.LOCK_UNTIL.le(now()))) + .execute() > 0); + } + + @Override + public void unlock(LockConfiguration lockConfiguration) { + Field lockAtLeastFor = t.LOCKED_AT.add(DayToSecond.valueOf(lockConfiguration.getLockAtLeastFor())); + dslContext.transaction(tx -> tx.dsl().update(t).set(t.LOCK_UNTIL, when(lockAtLeastFor.gt(now()), lockAtLeastFor).otherwise(now())) + .where(t.NAME.eq(lockConfiguration.getName()).and(t.LOCKED_BY.eq(getHostname()))) + .execute()); + } + + @Override + public boolean extend(@NonNull LockConfiguration lockConfiguration) { + return dslContext.transactionResult(tx -> tx.dsl().update(t).set(t.LOCK_UNTIL, nowPlus(lockConfiguration.getLockAtMostFor())) + .where(t.NAME.eq(lockConfiguration.getName()).and(t.LOCKED_BY.eq(getHostname())).and(t.LOCK_UNTIL.gt(now()))) + .execute() > 0); + } + + + private Map, Serializable> data(LockConfiguration lockConfiguration) { + return Map.of( + t.NAME, lockConfiguration.getName(), + t.LOCK_UNTIL, nowPlus(lockConfiguration.getLockAtMostFor()), + t.LOCKED_AT, now(), + t.LOCKED_BY, getHostname() + ); + } + + private Field now() { + return currentLocalDateTime(inline(6)); + } + + private Field nowPlus(Duration duration) { + return localDateTimeAdd(now(), DayToSecond.valueOf(duration)); + } +} diff --git a/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/Shedlock.java b/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/Shedlock.java new file mode 100644 index 000000000..95a2a3187 --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/main/java/net/javacrumbs/shedlock/provider/jooq/Shedlock.java @@ -0,0 +1,142 @@ +package net.javacrumbs.shedlock.provider.jooq; + + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Name; +import org.jooq.Record; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.Internal; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + +import java.time.LocalDateTime; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +class Shedlock extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of public.shedlock + */ + public static final Shedlock SHEDLOCK = new Shedlock(); + + public static final UniqueKey SHEDLOCK_PKEY = Internal.createUniqueKey(Shedlock.SHEDLOCK, DSL.name("shedlock_pkey"), new TableField[] { Shedlock.SHEDLOCK.NAME }, true); + + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return Record.class; + } + + /** + * The column public.shedlock.name. + */ + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(64).nullable(false), this, ""); + + /** + * The column public.shedlock.lock_until. + */ + public final TableField LOCK_UNTIL = createField(DSL.name("lock_until"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); + + /** + * The column public.shedlock.locked_at. + */ + public final TableField LOCKED_AT = createField(DSL.name("locked_at"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); + + /** + * The column public.shedlock.locked_by. + */ + public final TableField LOCKED_BY = createField(DSL.name("locked_by"), SQLDataType.VARCHAR(255).nullable(false), this, ""); + + private Shedlock(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private Shedlock(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); + } + + /** + * Create an aliased public.shedlock table reference + */ + public Shedlock(String alias) { + this(DSL.name(alias), SHEDLOCK); + } + + /** + * Create an aliased public.shedlock table reference + */ + public Shedlock(Name alias) { + this(alias, SHEDLOCK); + } + + /** + * Create a public.shedlock table reference + */ + public Shedlock() { + this(DSL.name("shedlock"), null); + } + + public Shedlock(Table child, ForeignKey key) { + super(child, key, SHEDLOCK); + } + + + @Override + public Shedlock as(String alias) { + return new Shedlock(DSL.name(alias), this); + } + + @Override + public Shedlock as(Name alias) { + return new Shedlock(alias, this); + } + + @Override + public Shedlock as(Table alias) { + return new Shedlock(alias.getQualifiedName(), this); + } + @Override + public UniqueKey getPrimaryKey() { + return SHEDLOCK_PKEY; + } + + /** + * Rename this table + */ + @Override + public Shedlock rename(String name) { + return new Shedlock(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public Shedlock rename(Name name) { + return new Shedlock(name, null); + } + + /** + * Rename this table + */ + @Override + public Shedlock rename(Table name) { + return new Shedlock(name.getQualifiedName(), null); + } +} + + diff --git a/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/AbstractJooqLockProviderIntegrationTest.java b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/AbstractJooqLockProviderIntegrationTest.java new file mode 100644 index 000000000..ebeecdfcc --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/AbstractJooqLockProviderIntegrationTest.java @@ -0,0 +1,50 @@ +/** + * Copyright 2009 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.support.StorageBasedLockProvider; +import net.javacrumbs.shedlock.test.support.jdbc.AbstractJdbcLockProviderIntegrationTest; +import net.javacrumbs.shedlock.test.support.jdbc.DbConfig; +import org.jetbrains.annotations.NotNull; +import org.jooq.DSLContext; + +public abstract class AbstractJooqLockProviderIntegrationTest extends AbstractJdbcLockProviderIntegrationTest { + private final DbConfig dbConfig; + + private final DSLContext dslContext; + + public AbstractJooqLockProviderIntegrationTest(DbConfig dbConfig, @NotNull DSLContext dslContext) { + this.dbConfig = dbConfig; + this.dslContext = dslContext; + } + + @Override + protected DbConfig getDbConfig() { + return dbConfig; + } + + @Override + protected StorageBasedLockProvider getLockProvider() { + return new JooqLockProvider(dslContext); + } + + @Override + protected boolean useDbTime() { + return true; + } +} + + diff --git a/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/HsqlJooqLockProviderIntegrationTest.java b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/HsqlJooqLockProviderIntegrationTest.java new file mode 100644 index 000000000..bec9a402c --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/HsqlJooqLockProviderIntegrationTest.java @@ -0,0 +1,43 @@ +/** + * Copyright 2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.test.support.jdbc.DbConfig; +import net.javacrumbs.shedlock.test.support.jdbc.HsqlConfig; +import org.jooq.SQLDialect; +import org.jooq.conf.RenderNameCase; +import org.jooq.conf.Settings; +import org.jooq.impl.DSL; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; + +public class HsqlJooqLockProviderIntegrationTest extends AbstractJooqLockProviderIntegrationTest { + private static final DbConfig dbConfig = new HsqlConfig(); + + public HsqlJooqLockProviderIntegrationTest() { + super(dbConfig, DSL.using(dbConfig.getDataSource(), SQLDialect.HSQLDB, new Settings().withRenderNameCase(RenderNameCase.UPPER))); + } + + @BeforeAll + public static void startDb() { + dbConfig.startDb(); + } + + @AfterAll + public static void shutdownDb() { + dbConfig.shutdownDb(); + } +} diff --git a/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/MariaDbJooqLockProviderIntegrationTest.java b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/MariaDbJooqLockProviderIntegrationTest.java new file mode 100644 index 000000000..d330d2d4b --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/MariaDbJooqLockProviderIntegrationTest.java @@ -0,0 +1,46 @@ +/** + * Copyright 2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.test.support.jdbc.DbConfig; +import net.javacrumbs.shedlock.test.support.jdbc.MariaDbConfig; +import org.jooq.SQLDialect; +import org.jooq.impl.DSL; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; + +public class MariaDbJooqLockProviderIntegrationTest extends AbstractJooqLockProviderIntegrationTest { + private static final DbConfig dbConfig = new MariaDbConfig() { + @Override + public String nowExpression() { + return "current_timestamp(6)"; + } + }; + + protected MariaDbJooqLockProviderIntegrationTest() { + super(dbConfig, DSL.using(dbConfig.getDataSource(), SQLDialect.MYSQL)); + } + + @BeforeAll + public static void startDb() { + dbConfig.startDb(); + } + + @AfterAll + public static void shutdownDb() { + dbConfig.shutdownDb(); + } +} diff --git a/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/MySqlJooqLockProviderIntegrationTest.java b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/MySqlJooqLockProviderIntegrationTest.java new file mode 100644 index 000000000..a267d0b67 --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/MySqlJooqLockProviderIntegrationTest.java @@ -0,0 +1,46 @@ +/** + * Copyright 2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.test.support.jdbc.DbConfig; +import net.javacrumbs.shedlock.test.support.jdbc.MySqlConfig; +import org.jooq.SQLDialect; +import org.jooq.impl.DSL; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; + +public class MySqlJooqLockProviderIntegrationTest extends AbstractJooqLockProviderIntegrationTest { + private static final DbConfig dbConfig = new MySqlConfig() { + @Override + public String nowExpression() { + return "current_timestamp(6)"; + } + }; + + protected MySqlJooqLockProviderIntegrationTest() { + super(dbConfig, DSL.using(dbConfig.getDataSource(), SQLDialect.MYSQL)); + } + + @BeforeAll + public static void startDb() { + dbConfig.startDb(); + } + + @AfterAll + public static void shutdownDb() { + dbConfig.shutdownDb(); + } +} diff --git a/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/PostgresJooqLockProviderIntegrationTest.java b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/PostgresJooqLockProviderIntegrationTest.java new file mode 100644 index 000000000..dd462ef0c --- /dev/null +++ b/providers/jdbc/shedlock-provider-jooq/src/test/java/net/javacrumbs/shedlock/provider/jooq/PostgresJooqLockProviderIntegrationTest.java @@ -0,0 +1,46 @@ +/** + * Copyright 2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.javacrumbs.shedlock.provider.jooq; + +import net.javacrumbs.shedlock.test.support.jdbc.DbConfig; +import net.javacrumbs.shedlock.test.support.jdbc.PostgresConfig; +import org.jooq.SQLDialect; +import org.jooq.impl.DSL; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; + +public class PostgresJooqLockProviderIntegrationTest extends AbstractJooqLockProviderIntegrationTest { + private static final DbConfig dbConfig = new PostgresConfig() { + @Override + public String nowExpression() { + return "CURRENT_TIMESTAMP"; + } + }; + + public PostgresJooqLockProviderIntegrationTest() { + super(dbConfig, DSL.using(dbConfig.getDataSource(), SQLDialect.POSTGRES)); + } + + @BeforeAll + public static void startDb() { + dbConfig.startDb(); + } + + @AfterAll + public static void shutdownDb() { + dbConfig.shutdownDb(); + } +} diff --git a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/JdbcTestUtils.java b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/JdbcTestUtils.java index eeee6a024..834c05ede 100644 --- a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/JdbcTestUtils.java +++ b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/JdbcTestUtils.java @@ -79,5 +79,14 @@ public Instant getLockUntil() { public Instant getDbTime() { return dbTime; } + + @Override + public String toString() { + return "LockInfo{" + + "name='" + name + '\'' + + ", lockUntil=" + lockUntil + + ", dbTime=" + dbTime + + '}'; + } } } diff --git a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MariaDbConfig.java b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MariaDbConfig.java index 1dfc41fa1..3edd63d40 100644 --- a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MariaDbConfig.java +++ b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MariaDbConfig.java @@ -17,7 +17,7 @@ import org.testcontainers.containers.MariaDBContainer; -public final class MariaDbConfig extends AbstractContainerBasedDbConfig { +public class MariaDbConfig extends AbstractContainerBasedDbConfig { public MariaDbConfig() { super(new MyMariaDbContainer() .withDatabaseName(TEST_SCHEMA_NAME) diff --git a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MySqlConfig.java b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MySqlConfig.java index 342d72786..cd434ea97 100644 --- a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MySqlConfig.java +++ b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/MySqlConfig.java @@ -17,7 +17,7 @@ import org.testcontainers.containers.MySQLContainer; -public final class MySqlConfig extends AbstractContainerBasedDbConfig { +public class MySqlConfig extends AbstractContainerBasedDbConfig { public MySqlConfig() { super(new MyMySQLContainer() .withDatabaseName(TEST_SCHEMA_NAME) diff --git a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/PostgresConfig.java b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/PostgresConfig.java index 949df4ccb..03adb1d40 100644 --- a/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/PostgresConfig.java +++ b/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/PostgresConfig.java @@ -17,7 +17,7 @@ import org.testcontainers.containers.PostgreSQLContainer; -public final class PostgresConfig extends AbstractContainerBasedDbConfig { +public class PostgresConfig extends AbstractContainerBasedDbConfig { public PostgresConfig() { super(new MyPostgreSQLContainer() .withDatabaseName(TEST_SCHEMA_NAME) diff --git a/shedlock-core/src/main/java/net/javacrumbs/shedlock/support/StorageBasedLockProvider.java b/shedlock-core/src/main/java/net/javacrumbs/shedlock/support/StorageBasedLockProvider.java index be1a09690..cec1afb80 100644 --- a/shedlock-core/src/main/java/net/javacrumbs/shedlock/support/StorageBasedLockProvider.java +++ b/shedlock-core/src/main/java/net/javacrumbs/shedlock/support/StorageBasedLockProvider.java @@ -43,7 +43,7 @@ * */ public class StorageBasedLockProvider implements ExtensibleLockProvider { - private final StorageAccessor storageAccessor; + private final StorageAccessor storageAccessor; private final LockRecordRegistry lockRecordRegistry = new LockRecordRegistry(); protected StorageBasedLockProvider(StorageAccessor storageAccessor) {