Intermittent test failure

Hi

I’m getting an intermittent test failure on the 4.2 build that doesn’t look to be caused by me?

Error Message
Unexpected ERROR logged: Writing of table to file encountered error: IOException: Workflow temp directory /var/lib/jenkins/jobs/org.lhasalimited.knime.update-4.2/workspace/tmp/knime_temp/knime_TableToHtmlStri65919 has been deleted.
Stacktrace
junit.framework.AssertionFailedError: Unexpected ERROR logged: Writing of table to file encountered error: IOException: Workflow temp directory /var/lib/jenkins/jobs/org.lhasalimited.knime.update-4.2/workspace/tmp/knime_temp/knime_TableToHtmlStri65919 has been deleted.
at org.knime.testing.core.ng.WorkflowLogMessagesTest.checkLogMessages(WorkflowLogMessagesTest.java:243)
at org.knime.testing.core.ng.WorkflowLogMessagesTest.run(WorkflowLogMessagesTest.java:138)
at org.knime.testing.core.ng.WorkflowTestSuite.run(WorkflowTestSuite.java:250)
at org.knime.testing.core.ng.WorkflowTestSuite.runTest(WorkflowTestSuite.java:368)
at org.knime.testing.core.ng.TestflowRunnerApplication.runAllTests(TestflowRunnerApplication.java:271)
at org.knime.testing.core.ng.TestflowRunnerApplication.access$1(TestflowRunnerApplication.java:243)
at org.knime.testing.core.ng.TestflowRunnerApplication$1.call(TestflowRunnerApplication.java:190)
at org.knime.testing.core.ng.TestflowRunnerApplication$1.call(TestflowRunnerApplication.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Example: https://community.knime.org/jenkins/view/4.2/job/org.lhasalimited.knime.update-4.2/11/testReport/junit/testflows.42.lhasa.tableToHtmlString2.tableToHtmlString_Simple_Streaming_Styles/assertions_off/log_messages/

Cheers

Sam

Hi @swebb,

looks like a temporary hiccup, the build is now green.

best,
Gabriel

Ish, it’s been in a few of the failing builds.I’ll let you know if it pops back up.

Hi,
I still have this problem (same trace) with Knime 4.3.1

.knime_testflow_log_issue testflow_log_issue.knwf (9.0 KB)

The issue still arises when the “check log messages” checkbox is ticked and when the testflow is not launched directly (right click on its name) but when it’s launched from the folder containing it (red boxed text)

I hope it will help to solve this issue.

junit.framework.AssertionFailedError: Unexpected ERROR logged: Failed to parse the workflow metadata file.
at org.knime.testing.core.ng.WorkflowLogMessagesTest.checkLogMessages(WorkflowLogMessagesTest.java:243)
at org.knime.testing.core.ng.WorkflowLogMessagesTest.run(WorkflowLogMessagesTest.java:138)
at org.knime.testing.core.ng.WorkflowTestSuite.run(WorkflowTestSuite.java:250)
at org.knime.testing.core.ng.WorkflowTestSuite.runTest(WorkflowTestSuite.java:368)
at org.knime.testing.internal.ui.TestflowJob.executeTestflow(TestflowJob.java:175)
at org.knime.testing.internal.ui.TestflowJob.run(TestflowJob.java:131)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hi @yannic_ariana,

Have you tried recreating that testworkflow? Just creating a new workflow and copying all nodes from the old ones to the new one? Maybe the workflow.metadata file of that workflow is corrupted, and that would be the quickest way to recreate it.

best,
Gabriel

Hi Gabriel,

I forgot to answer that.
Yes, I tried to create another empty workflow and copy/paste nodes in it.
I still have the same issue. I’m currently doing my tests on a nightly build of Knime4.4.

It’s really arising when the workflow is in a workflow group withing another workflow group.
Here is the trace I got today after creating a new empy workflow and pasted nodes…

junit.framework.AssertionFailedError: Unexpected ERROR logged: Failed to parse the workflow metadata file.
at org.knime.testing.core.ng.WorkflowLogMessagesTest.checkLogMessages(WorkflowLogMessagesTest.java:243)
at org.knime.testing.core.ng.WorkflowLogMessagesTest.run(WorkflowLogMessagesTest.java:138)
at org.knime.testing.core.ng.WorkflowTestSuite.run(WorkflowTestSuite.java:250)
at org.knime.testing.core.ng.WorkflowTestSuite.runTest(WorkflowTestSuite.java:368)
at org.knime.testing.internal.ui.TestflowJob.executeTestflow(TestflowJob.java:175)
at org.knime.testing.internal.ui.TestflowJob.run(TestflowJob.java:131)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Then even after deleting the original workflow with the metadata parsing issue, I still got the error message from the new workflow.

Hi @yannic_ariana,

Do you also have that problem if you run the testflows headlessly using the testflowrunner application?
If you need help setting that up you can contact me at gabriel.einsdorf@knime.com

best,
Gabriel

To make the solution we found public,

You can launch the testflowrunner headlessly using a launch configuration where you select the NGTestflowRunner application:

That application requires some configuration, it will tell you about it when miss configured, but with the following parameters you can get started with running testflows from a local directory:

The generated xml file can be read by junit.

launch config.xml
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
    <booleanAttribute key="append.args" value="true"/>
    <stringAttribute key="application" value="org.knime.testing.NGTestflowRunner"/>
    <booleanAttribute key="askclear" value="true"/>
    <booleanAttribute key="automaticAdd" value="true"/>
    <booleanAttribute key="automaticValidate" value="true"/>
    <stringAttribute key="bootstrap" value=""/>
    <stringAttribute key="checked" value="[NONE]"/>
    <booleanAttribute key="clearConfig" value="true"/>
    <booleanAttribute key="clearws" value="false"/>
    <booleanAttribute key="clearwslog" value="false"/>
    <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Testflowrunner"/>
    <booleanAttribute key="default" value="true"/>
    <booleanAttribute key="includeOptional" value="true"/>
    <stringAttribute key="location" value="${workspace_loc}/../Testflowrunner"/>
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
    <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
    <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
    <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -root <path-to-test-workflows> -xmlResult <path-to-result-file>"/>
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
    <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-server&#10;-Dsun.java2d.d3d=false&#10;-Dosgi.classloader.lock=classname&#10;-XX:+UnlockDiagnosticVMOptions&#10;-XX:+UnsyncloadClass &#10;-XX:+UseG1GC&#10;-ea&#10;-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false&#10;-Dorg.eclipse.swt.internal.gtk.useCairo=false&#10;-Dorg.eclipse.swt.browser.IEVersion=11001&#10;-Dsun.awt.noerasebackground=true&#10;-Dsun.net.client.defaultReadTimeout=0&#10;-Dorg.eclipse.swt.internal.gtk.disablePrinting"/>
    <stringAttribute key="pde.version" value="3.3"/>
    <stringAttribute key="product" value="org.knime.product.KNIME_PRODUCT"/>
    <booleanAttribute key="show_selected_only" value="false"/>
    <stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
    <booleanAttribute key="tracing" value="false"/>
    <booleanAttribute key="useCustomFeatures" value="false"/>
    <booleanAttribute key="useDefaultConfig" value="true"/>
    <booleanAttribute key="useDefaultConfigArea" value="true"/>
    <booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>

best,
Gabriel