Skip to content

Commit a65e49e

Browse files
authored
Feature/seqware 1905 workflow job hierarchy (#341)
* Fix attachment of batched provisioned-in jobs * Properly separate out long tests into new profile * More test moving to long profile
1 parent 686c4ef commit a65e49e

File tree

16 files changed

+90
-75
lines changed

16 files changed

+90
-75
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ When this is complete:
9494
(This runs all unit tests and integration tests that only require postgres as a prerequisite)
9595
mvn clean install -DskipITs=false -P extITs,embeddedTomcat
9696
(runs all unit tests and all integration tests including those that require Oozie)
97+
mvn clean install -DskipITs=false -P allITs,embeddedTomcat
98+
(runs all unit tests and all integration tests including those that require Oozie or take longer than can fix on Travis-CI)
9799

98100
In the last case, the extended integration tests profile is used to trigger integration tests that run our command line utilities.
99101
In order to point your command-line tools at the web service brought up by the integration tests, you will need to comment out your crontab and modify your SeqWare ~/.seqware/settings to include:
@@ -112,11 +114,11 @@ It is possible to disable our embedded tomcat instance and run against both a re
112114
EXTENDED_TEST_DB_USER=seqware
113115
EXTENDED_TEST_DB_PASSWORD=seqware
114116

115-
Then set your SW_REST_URL to the web service that uses the above database and invoke the following command. Note that you will need to deploy the seqware-webservice war yourself.
117+
Then set your SW\_REST\_URL to the web service that uses the above database and invoke the following command. Note that you will need to deploy the seqware-webservice war yourself.
116118

117119
mvn clean install -DskipITs=false -P 'extITs,!embeddedTomcat'
118120

119-
Alternatively, if you wish to still use an embedded tomcat instance for testing, modify the properties at the beginning of your seqware-webservice/pom.xml to match the above databases and invoke the integration tests with your SW_REST_URL set to http://localhost:8889/seqware-webservice
121+
Alternatively, if you wish to still use an embedded tomcat instance for testing, modify the properties at the beginning of your seqware-webservice/pom.xml to match the above databases and invoke the integration tests with your SW\_REST\_URL set to http://localhost:8889/seqware-webservice
120122

121123
mvn clean install -DskipITs=false -P extITs,embeddedTomcat
122124

seqware-ext-testing/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@
217217

218218
<profiles>
219219
<profile>
220+
<!-- run integration tests (IT) that require postgres and tomcat -->
221+
<!-- run extended integration tests (ET) that require Oozie -->
220222
<id>extITs</id>
221223
<build>
222224
<plugins>
@@ -237,6 +239,32 @@
237239
</plugins>
238240
</build>
239241
</profile>
242+
<profile>
243+
<!-- run integration tests (IT) that require postgres and tomcat -->
244+
<!-- run extended integration tests (ET) that require Oozie -->
245+
<!-- run long integration tests (LT) that take more time than can be provided by Travis-CI -->
246+
<id>allITs</id>
247+
<build>
248+
<plugins>
249+
<plugin>
250+
<groupId>org.apache.maven.plugins</groupId>
251+
<artifactId>maven-failsafe-plugin</artifactId>
252+
<version>${maven-failsafe-plugin.version}</version>
253+
254+
<configuration>
255+
<includes>
256+
<include>**/IT*.java</include>
257+
<include>**/*IT.java</include>
258+
<include>**/ET*.java</include>
259+
<include>**/*ET.java</include>
260+
<include>**/LT*.java</include>
261+
<include>**/*LT.java</include>
262+
</includes>
263+
</configuration>
264+
</plugin>
265+
</plugins>
266+
</build>
267+
</profile>
240268
<profile>
241269
<id>embeddedTomcat</id>
242270
<build>

seqware-ext-testing/src/test/java/io/seqware/pipeline/whitestar/WhiteStarTest.java renamed to seqware-ext-testing/src/test/java/io/seqware/pipeline/whitestar/WhiteStarLT.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.junit.AfterClass;
2828
import org.junit.Assert;
2929
import org.junit.BeforeClass;
30-
import org.junit.Ignore;
3130
import org.junit.Rule;
3231
import org.junit.Test;
3332
import org.junit.contrib.java.lang.system.ExpectedSystemExit;
@@ -45,7 +44,7 @@
4544
*
4645
* @author dyuen
4746
*/
48-
public class WhiteStarTest {
47+
public class WhiteStarLT {
4948

5049
@Rule
5150
public final ExpectedSystemExit exit = ExpectedSystemExit.none();
@@ -61,7 +60,6 @@ public static void teardownWhiteStarTest() {
6160
}
6261

6362
@Test
64-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
6563
public void testWhiteStarStandardWorkflow() throws Exception {
6664
Path createTempFile = createSettingsFile("whitestar", "inmemory");
6765
createAndRunWorkflow(createTempFile, false);
@@ -74,7 +72,7 @@ public void testWhiteStarParallelWorkflow() throws Exception {
7472
createAndRunWorkflow(createTempFile, false);
7573
}
7674

77-
protected static void createAndRunWorkflow(Path settingsFile, boolean metadata) throws Exception, IOException {
75+
static void createAndRunWorkflow(Path settingsFile, boolean metadata) throws Exception {
7876
// create a helloworld
7977
Path tempDir = Files.createTempDirectory("tempTestingDirectory");
8078
PluginRunner it = new PluginRunner();
@@ -122,7 +120,7 @@ protected static void createAndRunWorkflow(Path settingsFile, boolean metadata)
122120

123121
}
124122

125-
protected static Path createSettingsFile(String engine, String metadataMethod) throws IOException {
123+
static Path createSettingsFile(String engine, String metadataMethod) throws IOException {
126124
// override seqware settings file
127125
List<String> whiteStarProperties = new ArrayList<>();
128126
whiteStarProperties.add("SW_METADATA_METHOD=" + metadataMethod);

seqware-ext-testing/src/test/java/io/seqware/pipeline/whitestar/WhiteStarMetadataET.java renamed to seqware-ext-testing/src/test/java/io/seqware/pipeline/whitestar/WhiteStarMetadataLT.java

+9-8
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@
1616
*/
1717
package io.seqware.pipeline.whitestar;
1818

19-
import java.nio.file.Path;
2019
import org.junit.AfterClass;
2120
import org.junit.BeforeClass;
2221
import org.junit.Rule;
2322
import org.junit.Test;
2423
import org.junit.contrib.java.lang.system.ExpectedSystemExit;
2524

25+
import java.nio.file.Path;
26+
2627
/**
2728
* Run a helloworld using whitestar.
2829
*
2930
* @author dyuen
3031
*/
31-
public class WhiteStarMetadataET {
32+
public class WhiteStarMetadataLT {
3233

3334
@Rule
3435
public final ExpectedSystemExit exit = ExpectedSystemExit.none();
@@ -45,20 +46,20 @@ public static void teardownWhiteStarTest() {
4546

4647
@Test
4748
public void testWhiteStarSGEWorkflow() throws Exception {
48-
Path createTempFile = WhiteStarTest.createSettingsFile("whitestar-sge", "webservice");
49-
WhiteStarTest.createAndRunWorkflow(createTempFile, true);
49+
Path createTempFile = WhiteStarLT.createSettingsFile("whitestar-sge", "webservice");
50+
WhiteStarLT.createAndRunWorkflow(createTempFile, true);
5051
}
5152

5253
@Test
5354
public void testWhiteStarParallelWorkflowWithMetadata() throws Exception {
54-
Path createTempFile = WhiteStarTest.createSettingsFile("whitestar-parallel", "webservice");
55-
WhiteStarTest.createAndRunWorkflow(createTempFile, true);
55+
Path createTempFile = WhiteStarLT.createSettingsFile("whitestar-parallel", "webservice");
56+
WhiteStarLT.createAndRunWorkflow(createTempFile, true);
5657
}
5758

5859
@Test
5960
public void testWhiteStarWorkflowWithMetadata() throws Exception {
60-
Path createTempFile = WhiteStarTest.createSettingsFile("whitestar-parallel", "webservice");
61-
WhiteStarTest.createAndRunWorkflow(createTempFile, true);
61+
Path createTempFile = WhiteStarLT.createSettingsFile("whitestar-parallel", "webservice");
62+
WhiteStarLT.createAndRunWorkflow(createTempFile, true);
6263
}
6364

6465
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
@RunWith(Suite.class)
3131
@Suite.SuiteClasses(value = { CLIAdminPhase1.class })
32-
public class CLIAdminTutorialSuiteET extends TutorialSuite {
32+
public class CLIAdminTutorialSuiteLT extends TutorialSuite {
3333
@BeforeClass
3434
public static void resetDatabase() {
3535
ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
package net.sourceforge.seqware.pipeline.cli_tutorial;
1919

20-
import net.sourceforge.seqware.pipeline.tutorial.*;
2120
import net.sourceforge.seqware.pipeline.plugins.ExtendedTestDatabaseCreator;
21+
import net.sourceforge.seqware.pipeline.tutorial.DeveloperPhase1;
22+
import net.sourceforge.seqware.pipeline.tutorial.TutorialSuite;
2223
import org.junit.BeforeClass;
23-
import org.junit.Ignore;
2424
import org.junit.runner.RunWith;
2525
import org.junit.runners.Suite;
2626

@@ -34,10 +34,9 @@
3434
* @author dyuen
3535
*/
3636

37-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
3837
@RunWith(Suite.class)
3938
@Suite.SuiteClasses(value = { DeveloperPhase1.class, CLIDeveloperPhase2.class })
40-
public class CLIDeveloperTutorialSuiteET extends TutorialSuite {
39+
public class CLIDeveloperTutorialSuiteLT extends TutorialSuite {
4140
@BeforeClass
4241
public static void resetDatabase() {
4342
ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
@RunWith(Suite.class)
3131
@Suite.SuiteClasses(value = { CLIUserPhase1.class, CLIUserPhase2.class, CLIUserPhase3.class, CLIUserPhase4.class, CLIUserPhase5.class,
3232
CLIUserPhase6.class })
33-
public class CLIUserTutorialSuiteET extends TutorialSuite {
33+
public class CLIUserTutorialSuiteLT extends TutorialSuite {
3434
@BeforeClass
3535
public static void resetDatabase() {
3636
ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import net.sourceforge.seqware.pipeline.plugins.ExtendedTestDatabaseCreator;
2424
import net.sourceforge.seqware.pipeline.plugins.ITUtility;
2525
import org.junit.Assert;
26-
import org.junit.Ignore;
2726
import org.junit.Test;
2827

2928
import java.io.File;
@@ -36,10 +35,9 @@
3635
*
3736
* @author dyuen
3837
*/
39-
public class DebugWorkflowTutorialET {
38+
public class DebugWorkflowTutorialLT {
4039

4140
@Test
42-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
4341
public void runThroughFirstFailAtLaunchTutorial() throws IOException {
4442
// here we test that the first error is properly propagated into the database and reported
4543
ExtendedTestDatabaseCreator.resetDatabaseWithUsers(false);
@@ -60,7 +58,7 @@ public void runThroughFirstFailAtLaunchTutorial() throws IOException {
6058
Log.info(genOutput);
6159

6260
// Replace contents of WorkflowClient from both workflows with code from tutorial
63-
String tarTemplatePath = DebugWorkflowTutorialET.class.getResource("FailLaunch.template").getPath();
61+
String tarTemplatePath = DebugWorkflowTutorialLT.class.getResource("FailLaunch.template").getPath();
6462
// determine existing file paths
6563
File tarTarget = new File(tempDir, "BuggyWorkflow/src/main/java/com/github/seqware/BuggyWorkflowWorkflow.java");
6664

@@ -82,7 +80,6 @@ public void runThroughFirstFailAtLaunchTutorial() throws IOException {
8280
}
8381

8482
@Test
85-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
8683
public void runThroughFirstFailAtRuntimeTutorial() throws IOException {
8784
// here we test that the first error is properly propagated into the database and reported
8885
ExtendedTestDatabaseCreator.resetDatabaseWithUsers(false);
@@ -103,7 +100,7 @@ public void runThroughFirstFailAtRuntimeTutorial() throws IOException {
103100
Log.info(genOutput);
104101

105102
// Replace contents of WorkflowClient from both workflows with code from tutorial
106-
String tarTemplatePath = DebugWorkflowTutorialET.class.getResource("FailRun.template").getPath();
103+
String tarTemplatePath = DebugWorkflowTutorialLT.class.getResource("FailRun.template").getPath();
107104
// determine existing file paths
108105
File tarTarget = new File(tempDir, "BuggyWorkflow/src/main/java/com/github/seqware/BuggyWorkflowWorkflow.java");
109106

+7-8
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,32 @@
1818

1919
import com.google.common.io.Files;
2020
import io.seqware.cli.Main;
21-
import java.io.File;
22-
import java.io.IOException;
2321
import net.sourceforge.seqware.common.module.ReturnValue;
2422
import net.sourceforge.seqware.common.util.Log;
2523
import net.sourceforge.seqware.pipeline.plugins.ExtendedTestDatabaseCreator;
2624
import net.sourceforge.seqware.pipeline.plugins.ITUtility;
2725
import org.junit.Assert;
2826
import org.junit.BeforeClass;
29-
import org.junit.Ignore;
3027
import org.junit.Test;
3128

29+
import java.io.File;
30+
import java.io.IOException;
31+
3232
/**
3333
* These tests support the tutorial for BasicDeciders
3434
*
3535
* Causes issues with Travis-CI?
3636
*
3737
* @author dyuen
3838
*/
39-
public class BasicDeciderTutorialET {
39+
public class BasicDeciderTutorialLT {
4040

4141
@BeforeClass
4242
public static void resetDatabase() {
4343
ExtendedTestDatabaseCreator.resetDatabaseWithUsers(false);
4444
}
4545

4646
@Test
47-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
4847
public void runThroughTutorial() throws IOException {
4948
// create some top level metadata
5049
Main main = new Main();
@@ -111,9 +110,9 @@ public void runThroughTutorial() throws IOException {
111110
Log.info(genOutput);
112111

113112
// Replace contents of WorkflowClient from both workflows with code from tutorial
114-
String tarTemplatePath = BasicDeciderTutorialET.class.getResource("TarWorkflow.template").getPath();
115-
String gzTemplatePath = BasicDeciderTutorialET.class.getResource("GZWorkflow.template").getPath();
116-
String workflowIniTemplatePath = BasicDeciderTutorialET.class.getResource("workflowini.template").getPath();
113+
String tarTemplatePath = BasicDeciderTutorialLT.class.getResource("TarWorkflow.template").getPath();
114+
String gzTemplatePath = BasicDeciderTutorialLT.class.getResource("GZWorkflow.template").getPath();
115+
String workflowIniTemplatePath = BasicDeciderTutorialLT.class.getResource("workflowini.template").getPath();
117116
// determine existing file paths
118117
File tarTarget = new File(tempDir, "Tar/src/main/java/com/github/seqware/TarWorkflow.java");
119118
File gzTarget = new File(tempDir, "GZ/src/main/java/com/github/seqware/GZWorkflow.java");
+2-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import net.sourceforge.seqware.pipeline.plugins.ExtendedTestDatabaseCreator;
2424
import net.sourceforge.seqware.pipeline.plugins.ITUtility;
2525
import org.junit.Assert;
26-
import org.junit.Ignore;
2726
import org.junit.Test;
2827

2928
import java.io.File;
@@ -34,10 +33,9 @@
3433
*
3534
* @author dyuen
3635
*/
37-
public class OutofOrderWorkflowET {
36+
public class OutofOrderWorkflowLT {
3837

3938
@Test
40-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
4139
public void runSEQWARE1890() throws IOException {
4240
// here we test that the first error is properly propagated into the database and reported
4341
ExtendedTestDatabaseCreator.resetDatabaseWithUsers(false);
@@ -58,7 +56,7 @@ public void runSEQWARE1890() throws IOException {
5856
Log.info(genOutput);
5957

6058
// Replace contents of WorkflowClient from both workflows with code from tutorial
61-
String workflowJavaPath = OutofOrderWorkflowET.class.getResource("seqware1890.template").getPath();
59+
String workflowJavaPath = OutofOrderWorkflowLT.class.getResource("seqware1890.template").getPath();
6260
// determine existing file paths
6361
File targetJavaPath = new File(tempDir, "HelloOutofOrder/src/main/java/com/github/seqware/HelloOutofOrderWorkflow.java");
6462

Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import net.sourceforge.seqware.pipeline.plugins.ITUtility;
2525
import org.apache.commons.dbutils.handlers.ArrayHandler;
2626
import org.junit.Assert;
27-
import org.junit.Ignore;
2827
import org.junit.Test;
2928

3029
import java.io.File;
@@ -35,10 +34,9 @@
3534
*
3635
* @author dyuen
3736
*/
38-
public class SkippingFilesWorkflowET {
37+
public class SkippingFilesWorkflowLT {
3938

4039
@Test
41-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
4240
public void runSEQWARE2039() throws IOException {
4341
// here we test that the first error is properly propagated into the database and reported
4442
final ExtendedTestDatabaseCreator dbCreator = new ExtendedTestDatabaseCreator();
@@ -60,7 +58,7 @@ public void runSEQWARE2039() throws IOException {
6058
Log.info(genOutput);
6159

6260
// Replace contents of WorkflowClient from both workflows with code from tutorial
63-
String workflowJavaPath = SkippingFilesWorkflowET.class.getResource("seqware2039.template").getPath();
61+
String workflowJavaPath = SkippingFilesWorkflowLT.class.getResource("seqware2039.template").getPath();
6462
// determine existing file paths
6563
File targetJavaPath = new File(tempDir, "Skipping/src/main/java/io/seqware/SkippingWorkflow.java");
6664

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import net.sourceforge.seqware.pipeline.plugins.ExtendedTestDatabaseCreator;
2020
import org.junit.BeforeClass;
21-
import org.junit.Ignore;
2221
import org.junit.runner.RunWith;
2322
import org.junit.runners.Suite;
2423

@@ -27,10 +26,9 @@
2726
*
2827
* @author dyuen
2928
*/
30-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
3129
@RunWith(Suite.class)
3230
@Suite.SuiteClasses(value = { AdminPhase1.class })
33-
public class OldAdminTutorialSuiteET extends TutorialSuite {
31+
public class OldAdminTutorialSuiteLT extends TutorialSuite {
3432
@BeforeClass
3533
public static void resetDatabase() {
3634
ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
+1-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import net.sourceforge.seqware.pipeline.plugins.ExtendedTestDatabaseCreator;
2020
import org.junit.BeforeClass;
21-
import org.junit.Ignore;
2221
import org.junit.runner.RunWith;
2322
import org.junit.runners.Suite;
2423

@@ -28,10 +27,9 @@
2827
*
2928
* @author dyuen
3029
*/
31-
@Ignore("see https://github.com/SeqWare/seqware/issues/324")
3230
@RunWith(Suite.class)
3331
@Suite.SuiteClasses(value = { DeveloperPhase1.class, DeveloperPhase2.class })
34-
public class OldDeveloperTutorialSuiteET extends TutorialSuite {
32+
public class OldDeveloperTutorialSuiteLT extends TutorialSuite {
3533
@BeforeClass
3634
public static void resetDatabase() {
3735
ExtendedTestDatabaseCreator.resetDatabaseWithUsers();

0 commit comments

Comments
 (0)