From c264a1cf6c2cf2b0f1d10ca19266fbe5ee14f7b2 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 12:06:18 +0100 Subject: [PATCH 01/21] Update to JDK 16 and KNIME 4.0 - 6.0 --- plugin/META-INF/MANIFEST.MF | 8 +++---- pom.xml | 4 ++-- targetplatform/KNIME-AP-5.1.target | 37 ++++++++++++++++++++++++++++++ tests/META-INF/MANIFEST.MF | 6 ++--- 4 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 targetplatform/KNIME-AP-5.1.target diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF index a282be2..210ce85 100644 --- a/plugin/META-INF/MANIFEST.MF +++ b/plugin/META-INF/MANIFEST.MF @@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2 Bundle-Name: Test Knime workflows from a JUnit test Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.plugin;singleton:=true Bundle-Version: 1.0.3.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: Netherlands eScience Center Require-Bundle: org.knime.workbench.repository;bundle-version="[4.0.0,5.0.0)", - org.knime.workbench.core;bundle-version="[4.0.0,5.0.0)", - org.knime.testing;bundle-version="[4.0.0,5.0.0)", - org.junit;bundle-version="[4.8.0,5.0.0)", + org.knime.workbench.core;bundle-version="[4.0.0,6.0.0)", + org.knime.testing;bundle-version="[4.0.0,6.0.0)", + org.junit;bundle-version="[4.8.0,6.0.0)", org.apache.log4j;bundle-version="[1.2.15,1.3.0)" Bundle-ClassPath: . Export-Package: nl.esciencecenter.e3dchem.knime.testing diff --git a/pom.xml b/pom.xml index de8eaf7..f151929 100644 --- a/pom.xml +++ b/pom.xml @@ -27,8 +27,8 @@ - 1.4.0 - 1.4.0 + 2.7.0 + 2.7.0 -Xmx512m UTF-8 UTF-8 diff --git a/targetplatform/KNIME-AP-5.1.target b/targetplatform/KNIME-AP-5.1.target new file mode 100644 index 0000000..1cb945a --- /dev/null +++ b/targetplatform/KNIME-AP-5.1.target @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + +-server +-Dsun.java2d.d3d=false +-Dosgi.classloader.lock=classname +-XX:+UnlockDiagnosticVMOptions +-XX:+UnsyncloadClass +-XX:+UseG1GC +-ea +-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false +-Dorg.eclipse.swt.internal.gtk.useCairo=false +-Dorg.eclipse.swt.browser.IEVersion=10001 +-Dsun.awt.noerasebackground=true +-Dsun.net.client.defaultReadTimeout=0 +-Dorg.eclipse.swt.internal.gtk.disablePrinting + + diff --git a/tests/META-INF/MANIFEST.MF b/tests/META-INF/MANIFEST.MF index 37f0938..e381e2f 100644 --- a/tests/META-INF/MANIFEST.MF +++ b/tests/META-INF/MANIFEST.MF @@ -3,10 +3,10 @@ Bundle-ManifestVersion: 2 Bundle-Name: Tests Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.tests Bundle-Version: 1.0.3.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.junit;bundle-version="4.12.0", - org.knime.core;bundle-version="[4.0.0,5.0.0)", - org.knime.base;bundle-version="[4.0.0,5.0.0)", + org.knime.core;bundle-version="[4.0.0,6.0.0)", + org.knime.base;bundle-version="[4.0.0,6.0.0)", nl.esciencecenter.e3dchem.knime.testing.plugin Bundle-Vendor: Your Name Bundle-ClassPath: . From 39ca84e18ece581cfa1f29427358bd6470f61d03 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 13:09:57 +0100 Subject: [PATCH 02/21] Updated to allow 5.1 builds * UPdated Tycho Version * Added extra target profiles for 4.7 (Uses JDK-17) and 5.1 --- .mvn/extensions.xml | 8 +++++++ plugin/META-INF/MANIFEST.MF | 2 +- pom.xml | 8 ++++--- targetplatform/KNIME-AP-4.7.target | 37 ++++++++++++++++++++++++++++++ targetplatform/KNIME-AP-5.1.target | 2 +- tests/META-INF/MANIFEST.MF | 2 +- 6 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 .mvn/extensions.xml create mode 100644 targetplatform/KNIME-AP-4.7.target diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 0000000..3fceb34 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,8 @@ + + + + org.eclipse.tycho + tycho-build + 2.7.5 + + diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF index 210ce85..0db5919 100644 --- a/plugin/META-INF/MANIFEST.MF +++ b/plugin/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Test Knime workflows from a JUnit test Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.plugin;singleton:=true Bundle-Version: 1.0.3.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: Netherlands eScience Center Require-Bundle: org.knime.workbench.repository;bundle-version="[4.0.0,5.0.0)", org.knime.workbench.core;bundle-version="[4.0.0,6.0.0)", diff --git a/pom.xml b/pom.xml index f151929..8d36df0 100644 --- a/pom.xml +++ b/pom.xml @@ -27,10 +27,12 @@ - 2.7.0 - 2.7.0 + 2.7.5 + 2.7.5 -Xmx512m - UTF-8 + 1.8 + 3.10.1 + UTF-8 UTF-8 scm:git:https://github.com/3D-e-Chem/knime-testflow.git KNIME-AP-4.0 diff --git a/targetplatform/KNIME-AP-4.7.target b/targetplatform/KNIME-AP-4.7.target new file mode 100644 index 0000000..abdc349 --- /dev/null +++ b/targetplatform/KNIME-AP-4.7.target @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + +-server +-Dsun.java2d.d3d=false +-Dosgi.classloader.lock=classname +-XX:+UnlockDiagnosticVMOptions +-XX:+UnsyncloadClass +-XX:+UseG1GC +-ea +-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false +-Dorg.eclipse.swt.internal.gtk.useCairo=false +-Dorg.eclipse.swt.browser.IEVersion=10001 +-Dsun.awt.noerasebackground=true +-Dsun.net.client.defaultReadTimeout=0 +-Dorg.eclipse.swt.internal.gtk.disablePrinting + + diff --git a/targetplatform/KNIME-AP-5.1.target b/targetplatform/KNIME-AP-5.1.target index 1cb945a..4502706 100644 --- a/targetplatform/KNIME-AP-5.1.target +++ b/targetplatform/KNIME-AP-5.1.target @@ -12,7 +12,7 @@ - + diff --git a/tests/META-INF/MANIFEST.MF b/tests/META-INF/MANIFEST.MF index e381e2f..17fbcee 100644 --- a/tests/META-INF/MANIFEST.MF +++ b/tests/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Tests Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.tests Bundle-Version: 1.0.3.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.junit;bundle-version="4.12.0", org.knime.core;bundle-version="[4.0.0,6.0.0)", org.knime.base;bundle-version="[4.0.0,6.0.0)", From a3bc298324ec72c574197490bffdc9e9fa588e73 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 13:18:36 +0100 Subject: [PATCH 03/21] Added extra test args to run from mvn in jdk17 --- pom.xml | 15 +++++++++++++++ tests/pom.xml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d36df0..1f5702e 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,21 @@ UTF-8 scm:git:https://github.com/3D-e-Chem/knime-testflow.git KNIME-AP-4.0 + + --add-opens=java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED + --add-opens=java.base/sun.security.ssl=ALL-UNNAMED + --add-opens=java.base/sun.security.util=ALL-UNNAMED + --add-opens=java.base/java.lang=ALL-UNNAMED + --add-opens=java.base/java.lang.invoke=ALL-UNNAMED + --add-opens=java.base/java.net=ALL-UNNAMED + --add-opens=java.base/java.nio=ALL-UNNAMED + --add-opens=java.base/java.nio.channels=ALL-UNNAMED + --add-opens=java.base/java.util=ALL-UNNAMED + --add-opens=java.base/sun.nio.ch=ALL-UNNAMED + --add-opens=java.base/sun.nio=ALL-UNNAMED + --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED + --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED + -Dmisc.io.testing=true diff --git a/tests/pom.xml b/tests/pom.xml index 94da2a8..b15a68c 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -106,7 +106,7 @@ tycho-surefire-plugin ${tycho.version} - ${tycho.testArgLine} ${tycho.test.jvmArgs} + ${tycho.testArgLine} ${tycho.test.jvmArgs} ${knime.ini.testArgs} true ${custom.UIThread} From 02c77eb5dcfdc8c8687ef41f6d2a2b5eab9f23ff Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 13:26:59 +0100 Subject: [PATCH 04/21] Breaking surefire argLIne with newlines --- tests/pom.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/pom.xml b/tests/pom.xml index b15a68c..eb7165a 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -106,7 +106,9 @@ tycho-surefire-plugin ${tycho.version} - ${tycho.testArgLine} ${tycho.test.jvmArgs} ${knime.ini.testArgs} + ${tycho.testArgLine} + ${tycho.test.jvmArgs} + ${knime.ini.testArgs} true ${custom.UIThread} From a9280a51eb137e15c00d5d5193e78c008ccbb4f2 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 14:13:13 +0100 Subject: [PATCH 05/21] Updated jacoco version --- tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pom.xml b/tests/pom.xml index eb7165a..82f2d67 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -38,7 +38,7 @@ org.jacoco org.jacoco.ant - 0.7.8 + 0.8.8 ant-contrib From a43948a63d564d199e17b145df02f04df19b592d Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 14:17:54 +0100 Subject: [PATCH 06/21] Added jacoco excludes --- tests/pom.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/pom.xml b/tests/pom.xml index 82f2d67..529321c 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -47,13 +47,15 @@ - + < + <> jacoco-report verify run - + + + + **/*.jar + From 6f09e2e9af384ad1b82171ca37e3981e4a634403 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 14:18:50 +0100 Subject: [PATCH 07/21] Corrected pom.xml --- tests/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/pom.xml b/tests/pom.xml index 529321c..e28994e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -47,8 +47,6 @@ - < - <> jacoco-report verify From ba414e3f41a4482069fd32996e39f9978fc7ec89 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 14:20:33 +0100 Subject: [PATCH 08/21] Another pom.xml correction --- tests/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pom.xml b/tests/pom.xml index e28994e..0e7eb99 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -47,6 +47,7 @@ + jacoco-report verify From 0b78c176e999b090f1a64c583908eed013830777 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 14:23:01 +0100 Subject: [PATCH 09/21] Completed jacoco version update --- tests/pom.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/pom.xml b/tests/pom.xml index 0e7eb99..8722d18 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -16,7 +16,7 @@ org.jacoco jacoco-maven-plugin - 0.7.8 + 0.8.8 @@ -98,9 +98,6 @@ - - **/*.jar - From bb7e52450a34a7ef07284e3969a614f921ad104a Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 14:25:06 +0100 Subject: [PATCH 10/21] Yet more pom.xml corrections --- tests/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/pom.xml b/tests/pom.xml index 8722d18..abe5798 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -53,8 +53,7 @@ run - - + Date: Tue, 18 Jul 2023 14:34:00 +0100 Subject: [PATCH 11/21] Allowed org.knime.workbench.repository v <6.0.0 --- plugin/META-INF/MANIFEST.MF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF index 0db5919..3b94fe7 100644 --- a/plugin/META-INF/MANIFEST.MF +++ b/plugin/META-INF/MANIFEST.MF @@ -5,7 +5,7 @@ Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.plugin;singleton:=t Bundle-Version: 1.0.3.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: Netherlands eScience Center -Require-Bundle: org.knime.workbench.repository;bundle-version="[4.0.0,5.0.0)", +Require-Bundle: org.knime.workbench.repository;bundle-version="[4.0.0,6.0.0)", org.knime.workbench.core;bundle-version="[4.0.0,6.0.0)", org.knime.testing;bundle-version="[4.0.0,6.0.0)", org.junit;bundle-version="[4.8.0,6.0.0)", From 57a425510ce47d6960e5e1d94f0a87b2f528a198 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 16:01:53 +0100 Subject: [PATCH 12/21] Updated for WorkflowContext changes KNIME 4.7 onwards --- plugin/META-INF/MANIFEST.MF | 2 +- .../testing/core/ng/WorkflowExecuteTest.java | 4 +- .../testing/core/ng/WorkflowLoadTest.java | 8 ++-- pom.xml | 4 +- targetplatform/KNIME-AP-4.0.target | 37 ------------------- tests/META-INF/MANIFEST.MF | 2 +- 6 files changed, 9 insertions(+), 48 deletions(-) delete mode 100644 targetplatform/KNIME-AP-4.0.target diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF index 3b94fe7..b7f338d 100644 --- a/plugin/META-INF/MANIFEST.MF +++ b/plugin/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Test Knime workflows from a JUnit test Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.plugin;singleton:=true Bundle-Version: 1.0.3.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: Netherlands eScience Center Require-Bundle: org.knime.workbench.repository;bundle-version="[4.0.0,6.0.0)", org.knime.workbench.core;bundle-version="[4.0.0,6.0.0)", diff --git a/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowExecuteTest.java b/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowExecuteTest.java index 8d886c6..97e904c 100644 --- a/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowExecuteTest.java +++ b/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowExecuteTest.java @@ -63,7 +63,7 @@ import org.knime.core.node.workflow.SingleNodeContainer; import org.knime.core.node.workflow.SubNodeContainer; import org.knime.core.node.workflow.WorkflowManager; -import org.knime.core.util.GUIDeadlockDetector; +import org.knime.core.util.ThreadUtils; import org.knime.testing.core.TestrunConfiguration; import org.knime.testing.node.config.TestConfigNodeModel; @@ -128,7 +128,7 @@ private void internalRun() { (usage.getMax() - usage.getUsed()) / 1024.0 / 1024.0); message += "\n" + formatter.out().toString(); formatter.close(); - message += "\nThread status:\n" + GUIDeadlockDetector.createStacktrace(); + message += "\nThread status:\n" + ThreadUtils.getJVMStacktraces(); } NodeLogger.getLogger(WorkflowExecuteTest.class).info(message); collector.addError(new Throwable(message)); diff --git a/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowLoadTest.java b/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowLoadTest.java index b2a81d0..f923adb 100644 --- a/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowLoadTest.java +++ b/plugin/src/java/nl/esciencecenter/e3dchem/knime/testing/core/ng/WorkflowLoadTest.java @@ -57,7 +57,7 @@ import org.knime.core.node.ExecutionMonitor; import org.knime.core.node.InvalidSettingsException; import org.knime.core.node.workflow.UnsupportedWorkflowVersionException; -import org.knime.core.node.workflow.WorkflowContext; +import org.knime.core.node.workflow.contextv2.WorkflowContextV2; import org.knime.core.node.workflow.WorkflowLoadHelper; import org.knime.core.node.workflow.WorkflowManager; import org.knime.core.node.workflow.WorkflowPersistor.LoadResultEntry.LoadResultEntryType; @@ -121,10 +121,8 @@ static WorkflowManager loadWorkflow(final WorkflowTest test, final ErrorCollecto * {@inheritDoc} */ @Override - public WorkflowContext getWorkflowContext() { - WorkflowContext.Factory fac = new WorkflowContext.Factory(workflowDir); - fac.setMountpointRoot(testcaseRoot); - return fac.createContext(); + public WorkflowContextV2 getWorkflowContext() { + return WorkflowContextV2.forTemporaryWorkflow(workflowDir.toPath(), null); } }; diff --git a/pom.xml b/pom.xml index 1f5702e..499000c 100644 --- a/pom.xml +++ b/pom.xml @@ -30,12 +30,12 @@ 2.7.5 2.7.5 -Xmx512m - 1.8 + 17 3.10.1 UTF-8 UTF-8 scm:git:https://github.com/3D-e-Chem/knime-testflow.git - KNIME-AP-4.0 + KNIME-AP-4.7 --add-opens=java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED diff --git a/targetplatform/KNIME-AP-4.0.target b/targetplatform/KNIME-AP-4.0.target deleted file mode 100644 index 5278cb9..0000000 --- a/targetplatform/KNIME-AP-4.0.target +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - --server --Dsun.java2d.d3d=false --Dosgi.classloader.lock=classname --XX:+UnlockDiagnosticVMOptions --XX:+UnsyncloadClass --XX:+UseG1GC --ea --Dorg.eclipse.swt.internal.gtk.cairoGraphics=false --Dorg.eclipse.swt.internal.gtk.useCairo=false --Dorg.eclipse.swt.browser.IEVersion=10001 --Dsun.awt.noerasebackground=true --Dsun.net.client.defaultReadTimeout=0 --Dorg.eclipse.swt.internal.gtk.disablePrinting - - diff --git a/tests/META-INF/MANIFEST.MF b/tests/META-INF/MANIFEST.MF index 17fbcee..e381e2f 100644 --- a/tests/META-INF/MANIFEST.MF +++ b/tests/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Tests Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.tests Bundle-Version: 1.0.3.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.junit;bundle-version="4.12.0", org.knime.core;bundle-version="[4.0.0,6.0.0)", org.knime.base;bundle-version="[4.0.0,6.0.0)", From 12b17e2c753318b826319e406b8a24811cd54e41 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 16:13:27 +0100 Subject: [PATCH 13/21] Added extra tequirements to tests pom.xml --- tests/pom.xml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/pom.xml b/tests/pom.xml index abe5798..93fda1e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -113,6 +113,44 @@ ${custom.UIThread} + + org.eclipse.tycho + target-platform-configuration + ${tycho.version} + + + + + + eclipse-feature + org.knime.features.clfixes + 0.0.0 + + + eclipse-feature + org.knime.features.workbench + 0.0.0 + + + eclipse-feature + org.knime.features.core + 0.0.0 + + + eclipse-feature + org.knime.features.testing.application + 0.0.0 + + + eclipse-feature + org.knime.features.base + 0.0.0 + + + + + From cc93d61a0cb638e1451310808f760893eda2d7b9 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 16:37:26 +0100 Subject: [PATCH 14/21] Updated README and work towards multi-version builds Added subfolder for knime version to p2 output --- README.md | 14 ++++++++++---- p2/pom.xml | 2 +- pom.xml | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e7cc63..55149fc 100644 --- a/README.md +++ b/README.md @@ -102,18 +102,24 @@ script: xvfb-run mvn verify -B mvn verify ``` -An Eclipse update site will be made in `p2/target/repository` repository. +An Eclipse update site will be made in `p2/target/repository/4.7/` repository. The update site can be used to perform a local installation. +By default this will compile against KNIME AP v4.7, using the [KNIME-AP-4.7](targetPlatform/KNIME-AP-4.7.target) file. +To build instead for KNIME AP v5.1, use: +``` +mvn verify -Dknime.version=5.1 +``` +(In this case, the repository will be located in `p2/target/repository/5.1/`) # Development Steps to get development environment setup based on https://github.com/knime/knime-sdk-setup#sdk-setup: -1. Install Java 8 +1. Install Java 17 2. Install Eclipse for [RCP and RAP developers](https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-rcp-and-rap-developers) -3. Configure Java 8 inside Eclipse Window > Preferences > Java > Installed JREs +3. Configure Java 17 inside Eclipse Window > Preferences > Java > Installed JREs 4. Import this repo as an Existing Maven project -5. Activate target platform by going to Window > Preferences > Plug-in Development > Target Platform and check the `KNIME Analytics Platform (4.0) - nl.esciencecenter.e3dchem.knime.testing.targetplatform/KNIME-AP-4.0.target` target definition. +5. Activate target platform by going to Window > Preferences > Plug-in Development > Target Platform and check the `KNIME Analytics Platform (4.7) - nl.esciencecenter.e3dchem.knime.testing.targetplatform/KNIME-AP-4.7.target` target definition. During import the Tycho Eclipse providers must be installed. diff --git a/p2/pom.xml b/p2/pom.xml index f8bfa96..d682341 100644 --- a/p2/pom.xml +++ b/p2/pom.xml @@ -24,7 +24,7 @@ - ${project.build.directory}/repository + ${project.build.directory}/repository/${knime.version} ${target.update.site} diff --git a/pom.xml b/pom.xml index 499000c..d51ad50 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,8 @@ UTF-8 UTF-8 scm:git:https://github.com/3D-e-Chem/knime-testflow.git - KNIME-AP-4.7 + 4.7 + KNIME-AP-${knime.version} --add-opens=java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED From 1c3fe6cf5ef9a51e5c1de5fb0091fbf825ec36e9 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 16:58:14 +0100 Subject: [PATCH 15/21] Reverted error in p2 pom.xml and associated error in README.md --- README.md | 4 ++-- p2/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 55149fc..bceda0c 100644 --- a/README.md +++ b/README.md @@ -102,14 +102,14 @@ script: xvfb-run mvn verify -B mvn verify ``` -An Eclipse update site will be made in `p2/target/repository/4.7/` repository. +An Eclipse update site will be made in `p2/target/repository/` repository. The update site can be used to perform a local installation. By default this will compile against KNIME AP v4.7, using the [KNIME-AP-4.7](targetPlatform/KNIME-AP-4.7.target) file. To build instead for KNIME AP v5.1, use: ``` mvn verify -Dknime.version=5.1 ``` -(In this case, the repository will be located in `p2/target/repository/5.1/`) + # Development diff --git a/p2/pom.xml b/p2/pom.xml index d682341..f8bfa96 100644 --- a/p2/pom.xml +++ b/p2/pom.xml @@ -24,7 +24,7 @@ - ${project.build.directory}/repository/${knime.version} + ${project.build.directory}/repository ${target.update.site} From 90dc174cd13df71ab05a913039587d81a0845d99 Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 17:02:50 +0100 Subject: [PATCH 16/21] Extracted jacoco version to variable --- pom.xml | 3 ++- tests/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index d51ad50..b305cee 100644 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,9 @@ 2.7.5 - 2.7.5 + ${tycho.version} -Xmx512m + 0.8.10 17 3.10.1 UTF-8 diff --git a/tests/pom.xml b/tests/pom.xml index 93fda1e..9742331 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -16,7 +16,7 @@ org.jacoco jacoco-maven-plugin - 0.8.8 + ${jacoco.version} @@ -38,7 +38,7 @@ org.jacoco org.jacoco.ant - 0.8.8 + ${jacoco.version} ant-contrib From 07fa787f490883cc98a8a28f6c2004a99e7b5cfe Mon Sep 17 00:00:00 2001 From: sroughley Date: Tue, 18 Jul 2023 17:08:53 +0100 Subject: [PATCH 17/21] Updated version to 1.0.4 and updated changelog --- CHANGELOG.md | 4 ++++ p2/category.xml | 2 +- p2/pom.xml | 2 +- plugin/META-INF/MANIFEST.MF | 2 +- plugin/pom.xml | 2 +- pom.xml | 2 +- targetplatform/pom.xml | 2 +- tests/META-INF/MANIFEST.MF | 2 +- tests/pom.xml | 2 +- 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61f2c37..0eb06f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The file is formatted as described on http://keepachangelog.com/. +## [1.0.4] - 2023-07-18 + +- Builds by default with KNIME 4.7, can be configured to build with KNIME 5.1 [#10](https://github.com/3D-e-Chem/knime-testflow/issues/10) + ## [Unreleased] ### Changes diff --git a/p2/category.xml b/p2/category.xml index 52909b9..5edda1b 100644 --- a/p2/category.xml +++ b/p2/category.xml @@ -1,6 +1,6 @@ - + diff --git a/p2/pom.xml b/p2/pom.xml index f8bfa96..a4ffd3e 100644 --- a/p2/pom.xml +++ b/p2/pom.xml @@ -4,7 +4,7 @@ nl.esciencecenter.e3dchem.knime.testing nl.esciencecenter.e3dchem.knime.testing - 1.0.3-SNAPSHOT + 1.0.4-SNAPSHOT nl.esciencecenter.e3dchem.knime.testing.p2 eclipse-repository diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF index b7f338d..5ac2b6c 100644 --- a/plugin/META-INF/MANIFEST.MF +++ b/plugin/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test Knime workflows from a JUnit test Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.plugin;singleton:=true -Bundle-Version: 1.0.3.qualifier +Bundle-Version: 1.0.4.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: Netherlands eScience Center Require-Bundle: org.knime.workbench.repository;bundle-version="[4.0.0,6.0.0)", diff --git a/plugin/pom.xml b/plugin/pom.xml index ae49419..6f560b6 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -4,7 +4,7 @@ nl.esciencecenter.e3dchem.knime.testing nl.esciencecenter.e3dchem.knime.testing - 1.0.3-SNAPSHOT + 1.0.4-SNAPSHOT nl.esciencecenter.e3dchem.knime.testing.plugin eclipse-plugin diff --git a/pom.xml b/pom.xml index b305cee..0e55110 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 nl.esciencecenter.e3dchem.knime.testing nl.esciencecenter.e3dchem.knime.testing - 1.0.3-SNAPSHOT + 1.0.4-SNAPSHOT pom diff --git a/targetplatform/pom.xml b/targetplatform/pom.xml index 83fc8d3..f0460b6 100644 --- a/targetplatform/pom.xml +++ b/targetplatform/pom.xml @@ -20,7 +20,7 @@ Contributors: nl.esciencecenter.e3dchem.knime.testing nl.esciencecenter.e3dchem.knime.testing - 1.0.3-SNAPSHOT + 1.0.4-SNAPSHOT diff --git a/tests/META-INF/MANIFEST.MF b/tests/META-INF/MANIFEST.MF index e381e2f..23c5186 100644 --- a/tests/META-INF/MANIFEST.MF +++ b/tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Tests Bundle-SymbolicName: nl.esciencecenter.e3dchem.knime.testing.tests -Bundle-Version: 1.0.3.qualifier +Bundle-Version: 1.0.4.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.junit;bundle-version="4.12.0", org.knime.core;bundle-version="[4.0.0,6.0.0)", diff --git a/tests/pom.xml b/tests/pom.xml index 9742331..30abed3 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -5,7 +5,7 @@ nl.esciencecenter.e3dchem.knime.testing nl.esciencecenter.e3dchem.knime.testing - 1.0.3-SNAPSHOT + 1.0.4-SNAPSHOT nl.esciencecenter.e3dchem.knime.testing.tests From f149eb099ebc34426fe5f8719ba00fc18c235617 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Mon, 20 Nov 2023 11:21:26 +0100 Subject: [PATCH 18/21] Update node index --- .../e3dchem/knime/testing/TestFlowRunnerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/java/nl/esciencecenter/e3dchem/knime/testing/TestFlowRunnerTest.java b/tests/src/java/nl/esciencecenter/e3dchem/knime/testing/TestFlowRunnerTest.java index 4edba7e..bd0f85f 100644 --- a/tests/src/java/nl/esciencecenter/e3dchem/knime/testing/TestFlowRunnerTest.java +++ b/tests/src/java/nl/esciencecenter/e3dchem/knime/testing/TestFlowRunnerTest.java @@ -76,7 +76,7 @@ public void test_workflow_2messages() throws IOException, InvalidSettingsExcepti File workflow = new File("src/knime/messages"); List expected = new ArrayList(); expected.add( - "Node 'Table Creator 0:2' has unexpected warning message: expected 'This is not the warning message you are looking for.', got 'Node created an empty data table.'"); + "Node 'Table Creator 3:2' has unexpected warning message: expected 'This is not the warning message you are looking for.', got 'Node created an empty data table.'"); expected.add("Expected WARN log message 'This is not the warning message you are looking for.' not found"); assertWorkflowErrors(workflow, expected); From fce067259199b29247ba31d8051d8741d3df0cec Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Mon, 20 Nov 2023 11:27:16 +0100 Subject: [PATCH 19/21] Replace travis ci with github actions workflow --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 15 --------------- README.md | 1 - 3 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..edea9ab --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Verify + run: mvn -B verify + - name: Package + run: mvn -B package + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 42a3db8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -cache: - directories: - - $HOME/.m2 -language: java -matrix: - include: - - os: linux - jdk: oraclejdk8 - script: xvfb-run mvn verify -B - - os: osx - osx_image: xcode9.3 - script: Xvfb :5009 & export DISPLAY=:5009 && mvn verify -B -before_install: - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi -install: mvn package -B diff --git a/README.md b/README.md index bceda0c..df0798b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ Test Knime workflows from a Junit test. -[![Build Status](https://travis-ci.org/3D-e-Chem/knime-testflow.svg?branch=master)](https://travis-ci.org/3D-e-Chem/knime-testflow) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ba09652161144d9abbe4827fd16bbaec)](https://www.codacy.com/app/3D-e-Chem/knime-testflow?utm_source=github.com&utm_medium=referral&utm_content=3D-e-Chem/knime-testflow&utm_campaign=Badge_Grade) [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.55805.svg)](http://dx.doi.org/10.5281/zenodo.55805) From ff8f7d1dace338b3ee4c9dffb553e5c8cfdbdc4a Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Mon, 20 Nov 2023 11:32:31 +0100 Subject: [PATCH 20/21] Default to KNIME 5.1 overridable to 4.7 --- CHANGELOG.md | 4 ++-- README.md | 10 +++++----- pom.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb06f2..1fefc3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The file is formatted as described on http://keepachangelog.com/. -## [1.0.4] - 2023-07-18 +## [1.0.4] - 2023-11-20 -- Builds by default with KNIME 4.7, can be configured to build with KNIME 5.1 [#10](https://github.com/3D-e-Chem/knime-testflow/issues/10) +- Builds by default with KNIME 5.1, can be configured to build with KNIME 4.7 [#10](https://github.com/3D-e-Chem/knime-testflow/issues/10) ## [Unreleased] diff --git a/README.md b/README.md index df0798b..9e5d4f8 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ To make use of in a Tycho based project add to the `` tag of the ` In the `Require-Bundle` attribute of the `META-INF/MANIFEST.MF` of the tests module add ``` nl.esciencecenter.e3dchem.knime.testing.plugin;bundle-version="[1.0.0,2.0.0)", -org.knime.testing;bundle-version="[4.0.0,5.0.0)", +org.knime.testing;bundle-version="[4.0.0,6.0.0)", ``` ## 3. Add test workflow @@ -103,10 +103,10 @@ mvn verify An Eclipse update site will be made in `p2/target/repository/` repository. The update site can be used to perform a local installation. -By default this will compile against KNIME AP v4.7, using the [KNIME-AP-4.7](targetPlatform/KNIME-AP-4.7.target) file. -To build instead for KNIME AP v5.1, use: +By default this will compile against KNIME AP v5.1, using the [KNIME-AP-5..17](targetPlatform/KNIME-AP-5.1.target) file. +To build instead for KNIME AP v4.7, use: ``` -mvn verify -Dknime.version=5.1 +mvn verify -Dknime.version=4.7 ``` @@ -118,7 +118,7 @@ Steps to get development environment setup based on https://github.com/knime/kni 2. Install Eclipse for [RCP and RAP developers](https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-rcp-and-rap-developers) 3. Configure Java 17 inside Eclipse Window > Preferences > Java > Installed JREs 4. Import this repo as an Existing Maven project -5. Activate target platform by going to Window > Preferences > Plug-in Development > Target Platform and check the `KNIME Analytics Platform (4.7) - nl.esciencecenter.e3dchem.knime.testing.targetplatform/KNIME-AP-4.7.target` target definition. +5. Activate target platform by going to Window > Preferences > Plug-in Development > Target Platform and check the `KNIME Analytics Platform (5.1) - nl.esciencecenter.e3dchem.knime.testing.targetplatform/KNIME-AP-5.1.target` target definition. During import the Tycho Eclipse providers must be installed. diff --git a/pom.xml b/pom.xml index 0e55110..f4becf0 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ UTF-8 UTF-8 scm:git:https://github.com/3D-e-Chem/knime-testflow.git - 4.7 + 5.1 KNIME-AP-${knime.version} --add-opens=java.security.jgss/sun.security.jgss.krb5=ALL-UNNAMED From a60b23b9e64e26947dab8b4caf446007f14d5cec Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Mon, 20 Nov 2023 11:43:05 +0100 Subject: [PATCH 21/21] Replace travis with gha some more --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 2 ++ README.md | 12 ++++++------ pom.xml | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edea9ab..8b84b62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: distribution: 'temurin' cache: maven - name: Verify - run: mvn -B verify + run: xvfb-run mvn -B verify - name: Package run: mvn -B package diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fefc3c..f766f51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The file is formatted as described on http://keepachangelog.com/. ## [1.0.4] - 2023-11-20 +### Changes + - Builds by default with KNIME 5.1, can be configured to build with KNIME 4.7 [#10](https://github.com/3D-e-Chem/knime-testflow/issues/10) ## [Unreleased] diff --git a/README.md b/README.md index 9e5d4f8..e3d4612 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ org.knime.testing;bundle-version="[4.0.0,6.0.0)", ## 3. Add test workflow -Create a test workflow as described in the "Testing Framework" manual that you get when you install the "KNIME Testing Framework" (look in plugins/org.knime.testing_x.y.z/doc/Regression Tests.pdf). +Create a test workflow as described in the ["Testing Framework" manual](https://github.com/knime/knime-core/blob/bf6f8c378694d5a435ef29cb469a7ced26ffca9f/org.knime.testing/doc/Regression%20Tests.pdf). Place the workflow as a directory inside the `src/knime/` directory of the tests module. @@ -82,13 +82,13 @@ mvn verify The test results can be found in the `T E S T S` section of the standard output. -## 6. Add GUI testing to Travis-CI. +## 6. Add GUI testing on GitHub actions. As you might have noticed during the previouse step, running test will quickly show some dialogs and windows. -To show graphical user elements an X-server is required, sadly Travis-CI does not run an X-server. -A temporary X-server can be run with Xvfb, which is luckily available on all Travis-CI environments. +To show graphical user elements an X-server is required, sadly GitHub actions does not run an X-server. +A temporary X-server can be run with Xvfb, which is luckily available on all GitHub actions environments. -Prepend `xvfb-run` before the `mvn verify` command in the `.travis.yml` file. +Prepend `xvfb-run` before the `mvn verify` command in the `.github/workflows/*.yml` file. For example ``` @@ -103,7 +103,7 @@ mvn verify An Eclipse update site will be made in `p2/target/repository/` repository. The update site can be used to perform a local installation. -By default this will compile against KNIME AP v5.1, using the [KNIME-AP-5..17](targetPlatform/KNIME-AP-5.1.target) file. +By default this will compile against KNIME AP v5.1, using the [KNIME-AP-5.1](targetPlatform/KNIME-AP-5.1.target) file. To build instead for KNIME AP v4.7, use: ``` mvn verify -Dknime.version=4.7 diff --git a/pom.xml b/pom.xml index f4becf0..8053235 100644 --- a/pom.xml +++ b/pom.xml @@ -18,8 +18,8 @@ https://github.com/3D-e-Chem/knime-testflow/issues - Travis CI - http://travis-ci.org/3D-e-Chem/knime-testflow + GitHub Actions + https://github.com/3D-e-Chem/knime-testflow/actions