You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by peter-gergely-horvath <gi...@git.apache.org> on 2018/11/10 19:07:32 UTC

[GitHub] nifi pull request #3165: NIFI-5318 Implement NiFi test harness

GitHub user peter-gergely-horvath opened a pull request:

    https://github.com/apache/nifi/pull/3165

    NIFI-5318 Implement NiFi test harness

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/peter-gergely-horvath/nifi NIFI-5318

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/3165.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3165
    
----
commit 38878d267477454f9e126b4e784f79f80fb893f6
Author: Peter G. Horvath <pe...@...>
Date:   2018-11-10T19:05:58Z

    NIFI-5318 Implement NiFi test harness: initial commit

----


---

[GitHub] nifi issue #3165: NIFI-5318 Implement NiFi test harness

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/3165
  
    Will try to get back into it soon. BTW, thanks for putting it all back onto a branch.


---

[GitHub] nifi pull request #3165: NIFI-5318 Implement NiFi test harness

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3165#discussion_r236045789
  
    --- Diff: nifi-testharness/src/test/resources/sample_technology_rss.xml ---
    @@ -0,0 +1,28 @@
    +
    +<?xml version="1.0" encoding="UTF-8"?>
    --- End diff --
    
    Yes, it absolutely must be changed because the BBC is asserting its IP rights here:
    
    ```
    <copyright><![CDATA[Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions of reuse.]]></copyright>
    ```


---

[GitHub] nifi issue #3165: NIFI-5318 Implement NiFi test harness

Posted by peter-gergely-horvath <gi...@git.apache.org>.
Github user peter-gergely-horvath commented on the issue:

    https://github.com/apache/nifi/pull/3165
  
    Hi @MikeThomsen I have opened this new pull request instead of #2872 according your suggestions. Here we have everything sorted out you mentioned earlier on. Now the build executes the test cases if you specify `run-testharness-tests` and you now have the option to get the flow file version updated to the version of NiFi you are using. :)


---

[GitHub] nifi issue #3165: NIFI-5318 Implement NiFi test harness

Posted by peter-gergely-horvath <gi...@git.apache.org>.
Github user peter-gergely-horvath commented on the issue:

    https://github.com/apache/nifi/pull/3165
  
    Hi Guys, thank you for pointing this out. I've replaced it with some synthetic content.


---

[GitHub] nifi pull request #3165: NIFI-5318 Implement NiFi test harness

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3165#discussion_r236045703
  
    --- Diff: nifi-testharness/src/test/resources/sample_technology_rss.xml ---
    @@ -0,0 +1,28 @@
    +
    +<?xml version="1.0" encoding="UTF-8"?>
    --- End diff --
    
    this xml document looks like a real http response.  We cannot use it as test material unless we can assert its license and it is ALv2 compatible.  Its better to use entirely synthetic test data.


---

[GitHub] nifi issue #3165: NIFI-5318 Implement NiFi test harness

Posted by MikeThomsen <gi...@git.apache.org>.
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
    ```


---