odpi / egeria

Egeria core
https://egeria-project.org
Apache License 2.0
806 stars 261 forks source link

unbuffer breaks mvn build with test failure in information view server #1282

Closed planetf1 closed 5 years ago

planetf1 commented 5 years ago

This seems to occur on Ubuntu only - not MacOS

'unbuffer' (part of 'expect') can be used to allow escape codes (which allow maven to output coloured text) to be passed through 'tee' so that a build output can be saved both to a log, and viewed on screen

for example mvn clean install will produce color `mvn clean install 2>&1 | tee ~/log' will not 'unbuffer mvn clean install 2>&1 | tee ~/log' WILL

The last of these results in:

16:18:02.740 [main] DEBUG org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode - ==> OMRSErrorCode.getMessage([a8ebb5b5-be41-4fca-8806-17f4e43c63d7, getEntitySummary, null]): The entity identified with guid a8ebb5b5-be41-4fca-8806-17f4e43c63d7 passed on the getEntitySummary call is not known to the open metadata repository null
16:18:02.746 [main] DEBUG org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentHelper - Retrieved name property: section1.1
16:18:02.750 [main] DEBUG org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager.OMRSRepositoryContentHelper - Retrieved name property: section1.1
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:22 min
[INFO] Finished at: 2019-07-15T16:18:47Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project information-view-server: There are test failures.
[ERROR]
[ERROR] Please refer to /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server && /home/jonesn/java/jdk8u212-b03/jre/bin/java -javaagent:/home/jonesn/.m2/repository/org/jacoco/org.jacoco.agent/0.8.3/org.jacoco.agent-0.8.3-runtime.jar=destfile=/home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/jacoco.exec,append=true -jar /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/surefire/surefirebooter7345296184880328369.jar /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/surefire 2019-07-15T16-16-34_399-jvmRun1 surefire3502464642287147106tmp surefire_04362997515697935423tmp
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] org.odpi.openmetadata.accessservices.informationview.ReportCreationTest
[ERROR] 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 /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server && /home/jonesn/java/jdk8u212-b03/jre/bin/java -javaagent:/home/jonesn/.m2/repository/org/jacoco/org.jacoco.agent/0.8.3/org.jacoco.agent-0.8.3-runtime.jar=destfile=/home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/jacoco.exec,append=true -jar /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/surefire/surefirebooter7345296184880328369.jar /home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server/target/surefire 2019-07-15T16-16-34_399-jvmRun1 surefire3502464642287147106tmp surefire_04362997515697935423tmp
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] org.odpi.openmetadata.accessservices.informationview.ReportCreationTest
[ERROR]     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR]     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR]     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR]     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR]     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR]     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[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:56)
[ERROR]     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
[ERROR]     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
[ERROR]     at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
[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:282)
[ERROR]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR]     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[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
➜  information-view-server git:(akhilreddyjirra-docker-split) pwd
/home/jonesn/src/egeria/open-metadata-implementation/access-services/information-view/information-view-server
➜  information-view-server git:(akhilreddyjirra-docker-split) unbuffer mvn clean install

Intriguingly unbuffer works fine on MacOS

This is probably a weird unbuffer issue and is a somewhat obscure issue, but opening an issue to help anyone who hits in the future. Will also look to see if there is something specific about these tests that seems to cause the failure

planetf1 commented 5 years ago

still fails with latest master https://gist.github.com/79051697fb91be9478f7137ff80498e3

planetf1 commented 5 years ago

@ruxandraRosu could this be related to #1284 ?

planetf1 commented 5 years ago

After using the development2 branch @ruxandraRosu I get the same error

planetf1 commented 5 years ago

I've made a fix to the surefire default plugin configuration in the top level pom to stop use of the system classpath. This appears to prevent these odd issues & is suggested as a fix in the surefire documentation

planetf1 commented 5 years ago

This should now be fixed following #1298