public.shedlock
+ */
+ public static final Shedlock SHEDLOCK = new Shedlock();
+
+ public static final UniqueKeypublic.shedlock.name
.
+ */
+ public final TableFieldpublic.shedlock.lock_until
.
+ */
+ public final TableFieldpublic.shedlock.locked_at
.
+ */
+ public final TableFieldpublic.shedlock.locked_by
.
+ */
+ public final TableFieldpublic.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 + * 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