From 30639d2607be1921e884424307e571f3ae503188 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Fri, 9 Jun 2017 11:04:52 +0200 Subject: [PATCH] Ignore leaky tests + force test to run sequentially in same order Refs https://github.com/3D-e-Chem/knime-testflow/issues/6 --- .../e3dchem/kripodb/fragments/fragment_by_id.py | 2 +- tests/pom.xml | 4 +++- .../e3dchem/kripodb/FragmentsByIdWorkflowTest.java | 2 ++ .../kripodb/FragmentsBySimilarityWorkflowTest.java | 2 ++ .../kripodb/local/PharmacophoresWorkflowTest.java | 13 +++++++------ .../e3dchem/kripodb/ws/JavaWsWorkflowTest.java | 1 - 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugin/src/java/nl/esciencecenter/e3dchem/kripodb/fragments/fragment_by_id.py b/plugin/src/java/nl/esciencecenter/e3dchem/kripodb/fragments/fragment_by_id.py index 393fa52..0d31269 100644 --- a/plugin/src/java/nl/esciencecenter/e3dchem/kripodb/fragments/fragment_by_id.py +++ b/plugin/src/java/nl/esciencecenter/e3dchem/kripodb/fragments/fragment_by_id.py @@ -22,9 +22,9 @@ else: raise NotImplementedError('Type of identifier unknown') except IncompleteFragments as e: - output_table = e.fragments flow_variables['warning_message'] = e.message logging.warning("Following identifier(s) could not be found: " + ",".join(e.absent_identifiers)) + output_table = e.fragments else: if id_type == 'pdb': output_table = fragments_by_pdb_codes(queries, fragments_db_filename) diff --git a/tests/pom.xml b/tests/pom.xml index 4149c7c..33dae29 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -107,12 +107,14 @@ ${tycho.version} ${tycho.testArgLine} ${tycho.test.jvmArgs} + 1 + alphabetical - 60 + 65 diff --git a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsByIdWorkflowTest.java b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsByIdWorkflowTest.java index 7405d4d..0d57475 100644 --- a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsByIdWorkflowTest.java +++ b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsByIdWorkflowTest.java @@ -9,6 +9,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ErrorCollector; @@ -73,6 +74,7 @@ public void test_invalidsettings() throws IOException, InvalidSettingsException, runTestWorkflow("src/knime/kripo-fragment-information-test-invalidsettings"); } + @Ignore("Leaks log messages from Python to other tests sometimes") @Test public void test_notfound() throws IOException, InvalidSettingsException, CanceledExecutionException, UnsupportedWorkflowVersionException, LockFailedException, InterruptedException { diff --git a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsBySimilarityWorkflowTest.java b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsBySimilarityWorkflowTest.java index c359518..bbd92ed 100644 --- a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsBySimilarityWorkflowTest.java +++ b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/FragmentsBySimilarityWorkflowTest.java @@ -9,6 +9,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ErrorCollector; @@ -75,6 +76,7 @@ public void test_invalidsettings() throws IOException, InvalidSettingsException, runTestWorkflow(wfDir); } + @Ignore("Leaks log messages from Python to other tests sometimes") @Test public void test_similarFragments_notfound() throws IOException, InvalidSettingsException, CanceledExecutionException, UnsupportedWorkflowVersionException, LockFailedException, InterruptedException { diff --git a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/local/PharmacophoresWorkflowTest.java b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/local/PharmacophoresWorkflowTest.java index 417b6a3..45ca580 100644 --- a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/local/PharmacophoresWorkflowTest.java +++ b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/local/PharmacophoresWorkflowTest.java @@ -9,6 +9,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ErrorCollector; @@ -55,10 +56,10 @@ public static void cleanupDatafiles() { pharmacophoresdb.delete(); } -// TODO implement workflow -// @Test -// public void test_default() throws IOException, InvalidSettingsException, CanceledExecutionException, -// UnsupportedWorkflowVersionException, LockFailedException, InterruptedException { -// runTestWorkflow("src/knime/kripo-python-pharmacophores-test-default"); -// } + @Ignore("implement node and workflow") + @Test + public void test_default() throws IOException, InvalidSettingsException, CanceledExecutionException, + UnsupportedWorkflowVersionException, LockFailedException, InterruptedException { + runTestWorkflow("src/knime/kripo-python-pharmacophores-test-default"); + } } diff --git a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/ws/JavaWsWorkflowTest.java b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/ws/JavaWsWorkflowTest.java index 54698b9..69d04f6 100644 --- a/tests/src/java/nl/esciencecenter/e3dchem/kripodb/ws/JavaWsWorkflowTest.java +++ b/tests/src/java/nl/esciencecenter/e3dchem/kripodb/ws/JavaWsWorkflowTest.java @@ -62,7 +62,6 @@ public void test_fragmentInformation() throws IOException, InvalidSettingsExcept @Test public void test_pharmacophores() throws IOException, InvalidSettingsException, CanceledExecutionException, UnsupportedWorkflowVersionException, LockFailedException, InterruptedException { - TestrunConfiguration runConfiguration = new TestrunConfiguration(); File workflowDir = new File("src/knime/kripo-java-pharmacophore-test"); runner.runTestWorkflow(workflowDir); }