You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/12/12 17:10:00 UTC

[jira] [Commented] (NIFI-5318) Implement NiFi test harness

    [ https://issues.apache.org/jira/browse/NIFI-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719211#comment-16719211 ] 

ASF GitHub Bot commented on NIFI-5318:
--------------------------------------

Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/3165
  
    @peter-gergely-horvath Tried your latest change and still get these results:
    
    ```
    [INFO] -------------------------------------------------------
    [INFO] Running org.apache.nifi.testharness.samples.NiFiFlowTest
    [INFO] Running org.apache.nifi.testharness.samples.NiFiMockFlowTest
    [INFO] 
    [INFO] Results:
    [INFO] 
    [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 01:46 min
    [INFO] Finished at: 2018-12-12T11:20:20-05:00
    [INFO] Final Memory: 36M/602M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project nifi-testharness: There are test failures.
    [ERROR] 
    [ERROR] Please refer to /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire-reports for the individual test results.
    [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
    [ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
    [ERROR] Command was /bin/sh -c cd /Users/michaelthomsen/workspace/nifi/nifi-testharness/nifi_testharness_nifi_home && /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java -Xmx1G -Djava.net.preferIPv4Stack=true -jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire/surefirebooter5354893279908884469.jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire 2018-12-12T11-18-44_222-jvmRun1 surefire3770690799997642032tmp surefire_03864170411723641611tmp
    [ERROR] Error occurred in starting fork, check output in log
    [ERROR] Process Exit Code: 1
    [ERROR] Crashed tests:
    [ERROR] org.apache.nifi.testharness.samples.NiFiFlowTest
    [ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
    [ERROR] Command was /bin/sh -c cd /Users/michaelthomsen/workspace/nifi/nifi-testharness/nifi_testharness_nifi_home && /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java -Xmx1G -Djava.net.preferIPv4Stack=true -jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire/surefirebooter8415059538712188018.jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire 2018-12-12T11-18-44_222-jvmRun1 surefire7043843761330522886tmp surefire_12826311853280960897tmp
    [ERROR] Error occurred in starting fork, check output in log
    [ERROR] Process Exit Code: 1
    [ERROR] Crashed tests:
    [ERROR] org.apache.nifi.testharness.samples.NiFiMockFlowTest
    [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
    [ERROR] Command was /bin/sh -c cd /Users/michaelthomsen/workspace/nifi/nifi-testharness/nifi_testharness_nifi_home && /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java -Xmx1G -Djava.net.preferIPv4Stack=true -jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire/surefirebooter5354893279908884469.jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire 2018-12-12T11-18-44_222-jvmRun1 surefire3770690799997642032tmp surefire_03864170411723641611tmp
    [ERROR] Error occurred in starting fork, check output in log
    [ERROR] Process Exit Code: 1
    [ERROR] Crashed tests:
    [ERROR] org.apache.nifi.testharness.samples.NiFiFlowTest
    [ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
    [ERROR] Command was /bin/sh -c cd /Users/michaelthomsen/workspace/nifi/nifi-testharness/nifi_testharness_nifi_home && /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java -Xmx1G -Djava.net.preferIPv4Stack=true -jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire/surefirebooter8415059538712188018.jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire 2018-12-12T11-18-44_222-jvmRun1 surefire7043843761330522886tmp surefire_12826311853280960897tmp
    [ERROR] Error occurred in starting fork, check output in log
    [ERROR] Process Exit Code: 1
    [ERROR] Crashed tests:
    [ERROR] org.apache.nifi.testharness.samples.NiFiMockFlowTest
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:496)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:443)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:295)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
    [ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)
    [ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
    [ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
    [ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    [ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    [ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    [ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    [ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    [ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    [ERROR] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    [ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    [ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    [ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    [ERROR] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    [ERROR] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    [ERROR] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    [ERROR] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    [ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [ERROR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR] 	at java.lang.reflect.Method.invoke(Method.java:498)
    [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    [ERROR] Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
    [ERROR] Command was /bin/sh -c cd /Users/michaelthomsen/workspace/nifi/nifi-testharness/nifi_testharness_nifi_home && /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java -Xmx1G -Djava.net.preferIPv4Stack=true -jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire/surefirebooter8415059538712188018.jar /Users/michaelthomsen/workspace/nifi/nifi-testharness/target/surefire 2018-12-12T11-18-44_222-jvmRun1 surefire7043843761330522886tmp surefire_12826311853280960897tmp
    [ERROR] Error occurred in starting fork, check output in log
    [ERROR] Process Exit Code: 1
    [ERROR] Crashed tests:
    [ERROR] org.apache.nifi.testharness.samples.NiFiMockFlowTest
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$700(ForkStarter.java:116)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:431)
    [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:408)
    [ERROR] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [ERROR] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    [ERROR] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    [ERROR] 	at java.lang.Thread.run(Thread.java:748)
    [ERROR] 
    [ERROR] -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    ```


> Implement NiFi test harness
> ---------------------------
>
>                 Key: NIFI-5318
>                 URL: https://issues.apache.org/jira/browse/NIFI-5318
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Peter Horvath
>            Priority: Major
>
> Currently, it is not really possible to automatically test the behaviour of a specific NiFi flow and make unit test type asserts if it works as expected. 
> For example, if the expected behaviour of a NiFi flow is that a file placed to a specific directory will trigger some operation after which some output file will appear at another directory, once currently can only do one thing: test the NiFi flow manually. 
> Manual testing is especially hard to manage if a NiFi flow is being actively developed: any change to a complex, existing NiFi flow might require a lot of manual testing just to ensure there are no regressions introduced. 
> Some kind of Java API that allows managing a NiFi instance and manipulating flow deployments like for example, [Codehaus Cargo|]https://codehaus-cargo.github.io/] would be of great help. 
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)