-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First prototype without java -/7 compat
- Loading branch information
1 parent
737d7ed
commit 8d69de6
Showing
15 changed files
with
485 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,49 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.enioka.jqm</groupId> | ||
<artifactId>jqm-all</artifactId> | ||
<version>2.2.10-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>jqm-api</artifactId> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.enioka.jqm</groupId> | ||
<artifactId>jqm-all</artifactId> | ||
<version>2.2.10-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>jqm-api</artifactId> | ||
|
||
<name>${project.groupId}:${project.artifactId}</name> | ||
<url>http://jqm.readthedocs.org</url> | ||
<description>JQM public API interfaces</description> | ||
<name>${project.groupId}:${project.artifactId}</name> | ||
<url>http://jqm.readthedocs.org</url> | ||
<description>JQM public API interfaces</description> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-xsd</id> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<phase>compile</phase> | ||
<configuration> | ||
<tasks> | ||
<copy file="${project.build.directory}/../../jqm-xml/src/main/resources/res.xsd" tofile="${project.build.directory}/classes/res.xsd" /> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-xsd</id> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<phase>compile</phase> | ||
<configuration> | ||
<tasks> | ||
<copy file="${project.build.directory}/../../jqm-xml/src/main/resources/res.xsd" tofile="${project.build.directory}/classes/res.xsd" /> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifestEntries> | ||
<Automatic-Module-Name>com.enioka.jqm.payload.api</Automatic-Module-Name> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
jqm-all/jqm-integration-tests/src/test/java/com/enioka/jqm/tools/EngineJpmsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package com.enioka.jqm.tools; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import com.enioka.jqm.api.JobRequest; | ||
import com.enioka.jqm.test.helpers.CreationTools; | ||
import com.enioka.jqm.test.helpers.TestHelpers; | ||
|
||
public class EngineJpmsTest extends JqmBaseTest | ||
{ | ||
@Test | ||
public void testJpmsModuleStartsWithApi() | ||
{ | ||
addAndStartEngine(); | ||
|
||
CreationTools.createJobDef(null, true, "com.enioka.jqm.tests.jpms/com.enioka.jqm.tests.jpms.SimpleJpmsPayload", null, | ||
"jqm-tests/jqm-test-jpms/target/test.jar", TestHelpers.qVip, -1, "SimpleJpmsPayload", null, null, null, null, null, false, | ||
cnx, null, false); | ||
JobRequest.create("SimpleJpmsPayload", null).submit(); | ||
|
||
TestHelpers.waitFor(1, 10000, cnx); | ||
|
||
Assert.assertEquals(1, TestHelpers.getOkCount(cnx)); | ||
Assert.assertEquals(0, TestHelpers.getNonOkCount(cnx)); | ||
} | ||
|
||
@Test | ||
public void testNonJpmsStartInClassicMode() | ||
{ | ||
addAndStartEngine(); | ||
|
||
CreationTools.createJobDef(null, true, "pyl.Nothing", null, "jqm-tests/jqm-test-pyl-nodep/target/test.jar", TestHelpers.qVip, -1, | ||
"SimpleNonJpmsPayload", null, null, null, null, null, false, cnx, null, false); | ||
JobRequest.create("SimpleNonJpmsPayload", null).submit(); | ||
|
||
TestHelpers.waitFor(1, 10000, cnx); | ||
|
||
Assert.assertEquals(1, TestHelpers.getOkCount(cnx)); | ||
Assert.assertEquals(0, TestHelpers.getNonOkCount(cnx)); | ||
} | ||
|
||
@Test | ||
public void testNonJpmsStartInJpmsMode() | ||
{ | ||
addAndStartEngine(); | ||
|
||
// Note we are using an automatic module name here. | ||
CreationTools.createJobDef(null, true, "test/pyl.Nothing", null, "jqm-tests/jqm-test-pyl-nodep/target/test.jar", TestHelpers.qVip, | ||
-1, "SimpleNonJpmsPayload", null, null, null, null, null, false, cnx, null, false); | ||
JobRequest.create("SimpleNonJpmsPayload", null).submit(); | ||
|
||
TestHelpers.waitFor(1, 10000, cnx); | ||
|
||
Assert.assertEquals(1, TestHelpers.getOkCount(cnx)); | ||
Assert.assertEquals(0, TestHelpers.getNonOkCount(cnx)); | ||
} | ||
|
||
@Test | ||
public void testJpmsWithJndiCall() | ||
{ | ||
// This tests checks the JNDI provider located inside the ext layer is accessible to the payload. | ||
CreationTools.createJndiFile(cnx, "fs/test", "test resource", "/tmp"); | ||
|
||
JqmSimpleTest.create(cnx, "test/pyl.JndiFile", "jqm-test-pyl-nodep").run(this); | ||
} | ||
|
||
@Test | ||
public void testNonJpmsWithJndiCall() | ||
{ | ||
// Sanity check. | ||
CreationTools.createJndiFile(cnx, "fs/test", "test resource", "/tmp"); | ||
|
||
JqmSimpleTest.create(cnx, "pyl.JndiFile", "jqm-test-pyl-nodep").run(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.