Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial quartz metadata #34

Merged
merged 1 commit into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions metadata/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@
{
"directory": "org.jetbrains.kotlin/kotlin-reflect",
"module": "org.jetbrains.kotlin:kotlin-reflect"
},
{
"directory": "org.quartz-scheduler/quartz",
"module": "org.quartz-scheduler:quartz"
}
]
4 changes: 4 additions & 0 deletions metadata/org.quartz-scheduler/quartz/2.3.2/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"reflect-config.json",
"resource-config.json"
]
87 changes: 87 additions & 0 deletions metadata/org.quartz-scheduler/quartz/2.3.2/reflect-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
[
{
"name": "org.quartz.simpl.SimpleThreadPool",
"condition": {
"typeReachable": "org.quartz.impl.StdSchedulerFactory"
},
"allDeclaredConstructors": true,
"methods": [
{
"name": "setThreadCount",
"parameterTypes": [
"int"
]
},
{
"name": "setThreadPriority",
"parameterTypes": [
"int"
]
},
{
"name": "setThreadNamePrefix",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setThreadsInheritContextClassLoaderOfInitializingThread",
"parameterTypes": [
"boolean"
]
},
{
"name": "setMakeThreadsDaemons",
"parameterTypes": [
"boolean"
]
},
{
"name": "setInstanceName",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setInstanceId",
"parameterTypes": [
"java.lang.String"
]
}
]
},
{
"name": "org.quartz.simpl.RAMJobStore",
"condition": {
"typeReachable": "org.quartz.impl.StdSchedulerFactory"
},
"allDeclaredConstructors": true,
"methods": [
{
"name": "setMisfireThreshold",
"parameterTypes": [
"long"
]
},
{
"name": "setInstanceName",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setInstanceId",
"parameterTypes": [
"java.lang.String"
]
}
]
},
{
"name": "org.quartz.simpl.CascadingClassLoadHelper",
"condition": {
"typeReachable": "org.quartz.impl.StdSchedulerFactory"
},
"allDeclaredConstructors": true
}
]
27 changes: 27 additions & 0 deletions metadata/org.quartz-scheduler/quartz/2.3.2/resource-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"resources": {
"includes": [
{
"pattern": "\\Qorg/quartz/impl/jdbcjobstore/tables_\\E.*\\Q.sql\\E"
},
{
"pattern": "\\Qquartz.properties\\E",
"condition": {
"typeReachable": "org.quartz.impl.StdSchedulerFactory"
}
},
{
"pattern": "\\Qorg/quartz/quartz.properties\\E",
"condition": {
"typeReachable": "org.quartz.impl.StdSchedulerFactory"
}
},
{
"pattern": "\\Qorg/quartz/core/quartz-build.properties\\E",
"condition": {
"typeReachable": "org.quartz.impl.StdSchedulerFactory"
}
}
]
}
}
10 changes: 10 additions & 0 deletions metadata/org.quartz-scheduler/quartz/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"latest": true,
"metadata-version": "2.3.2",
"module": "org.quartz-scheduler:quartz",
"tested-versions": [
"2.3.2"
]
}
]
11 changes: 11 additions & 0 deletions tests/src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,16 @@
]
}
]
},
{
"test-project-path": "org.quartz-scheduler/quartz/2.3.2",
"libraries": [
{
"name": "org.quartz-scheduler:quartz",
"versions": [
"2.3.2"
]
}
]
}
]
27 changes: 27 additions & 0 deletions tests/src/org.quartz-scheduler/quartz/2.3.2/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright and related rights waived via CC0
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

import org.graalvm.internal.tck.TestUtils

plugins {
id "org.graalvm.internal.tck"
}

String libraryVersion = TestUtils.testedLibraryVersion

dependencies {
testImplementation("org.quartz-scheduler:quartz:$libraryVersion")
testImplementation('org.assertj:assertj-core:3.22.0')
}

graalvmNative {
binaries {
test {
buildArgs.add('--no-fallback')
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
library.version = 2.3.2
metadata.dir = org.quartz-scheduler/quartz/2.3.2/
20 changes: 20 additions & 0 deletions tests/src/org.quartz-scheduler/quartz/2.3.2/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright and related rights waived via CC0
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

pluginManagement {
def tckPath = Objects.requireNonNullElse(
System.getenv("GVM_TCK_TCKDIR"),
"../../../../tck-build-logic"
)
includeBuild(tckPath)
}

plugins {
id "org.graalvm.internal.tck-settings" version "1.0.0-SNAPSHOT"
}

rootProject.name = 'quartz-tests'
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright and related rights waived via CC0
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
package org.quartz;

import java.io.InputStream;

import org.junit.jupiter.api.Test;
import org.quartz.impl.StdSchedulerFactory;

import static org.assertj.core.api.Assertions.assertThat;

public class QuartzTest {

@Test
void propertyFile() {
InputStream stream = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("org/quartz/quartz.properties");
assertThat(stream).isNotNull();
}

@Test
void buildPropertyFile() {
InputStream stream = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("org/quartz/core/quartz-build.properties");
assertThat(stream).isNotNull();
}

@Test
void schemaFile() {
InputStream stream = Thread.currentThread().getContextClassLoader()
.getResourceAsStream("org/quartz/impl/jdbcjobstore/tables_h2.sql");
assertThat(stream).isNotNull();
}

@Test
void initializeStdFactory() throws SchedulerException {
StdSchedulerFactory factory = new StdSchedulerFactory();
Scheduler scheduler = factory.getScheduler();
assertThat(scheduler.getSchedulerName()).isEqualTo("DefaultQuartzScheduler");
}
}