Praqma / pretested-integration-plugin

A generic pretest commit plugin for Jenkins CI
MIT License
7 stars 14 forks source link

update test with new git plugin version #74

Closed groenborg closed 7 years ago

groenborg commented 7 years ago

the maven git-plugin dependency have been bumped from version 1.x to 2.x which introduces errors in RevWalk() in jgit.

Try to fix a test by moving away form using this method

kryptag commented 7 years ago

after bumping version we can get a full run without errors in dependencies, but now we can see the failing tests

Results :

Failed tests: 
  ChangelessBranchFailsBuildIT.accumulated_changelessBranchFailsBuild:55
  ChangelessBranchFailsBuildIT.squash_changelessBranchFailsBuild:43
  MultipleScm_threeRepos_IT.oneReadyPlusTwoMasterConfiguration:285 Polling log does not contain message about 'No existing build'
  MultipleScm_threeRepos_IT.twoMasterPlusOneReadyConfiguration:452 Polling log does not contain message about 'No existing build'
Tests in error: 
  MultipleScmIT.verifyOrderOfBuildDataObjects:49 » IllegalState Repository alrea...

Tests run: 73, Failures: 4, Errors: 1, Skipped: 7

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.19.1:verify (default) @ pretested-integration ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:00 min
[INFO] Finished at: 2017-09-21T11:11:04+02:00
[INFO] Final Memory: 72M/749M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project pretested-integration: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/florenthaxha/Work/pretested-integration-plugin/target/failsafe-reports for the individual test results.
[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/MojoFailureException
groenborg commented 7 years ago

Wahuuu...

groenborg commented 7 years ago

Attempting to destroy git repository workdir: /Users/simon/Github/praqma/pretested-integration-plugin/oneReadyPlusTwoMasterConfiguration-repo3 Sep 21, 2017 11:31:30 AM org.jenkinsci.plugins.pretestedintegration.PretestedIntegrationPostCheckout perform SEVERE: IOException in post checkout org.jenkinsci.plugins.pretestedintegration.exceptions.NothingToDoException: Nothing to do. The reason is: No Git SCM change found. at org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge.findRelevantBuildData(GitBridge.java:228) at org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge.updateBuildDescription(GitBridge.java:340) at org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge.handlePostBuild(GitBridge.java:453) at org.jenkinsci.plugins.pretestedintegration.PretestedIntegrationPostCheckout.perform(PretestedIntegrationPostCheckout.java:69) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410)

kryptag commented 7 years ago

the errors i get now when i run this specific file: MultipleScm_threeRepos_IT.java

Sep 21, 2017 11:43:24 AM org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge handlePostBuild
WARNING: Build result not satisfied - skipped post-build step.
Sep 21, 2017 11:43:24 AM hudson.TcpSlaveAgentListener shutdown
WARNING: Failed to close down TCP port
java.io.IOException: No such file or directory
    at sun.nio.ch.NativeThread.signal(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292)
    at java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234)
    at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
    at hudson.TcpSlaveAgentListener.shutdown(TcpSlaveAgentListener.java:119)
    at jenkins.model.Jenkins.cleanUp(Jenkins.java:2862)
    at org.jvnet.hudson.test.JenkinsRule.after(JenkinsRule.java:461)
    at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:532)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
Sep 21, 2017 11:43:24 AM hudson.model.Run execute
INFO: test0 #11 aborted
java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:502)
    at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
    at hudson.Proc$LocalProc.join(Proc.java:319)
    at hudson.Proc.joinWithTimeout(Proc.java:168)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1920)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1892)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1888)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1533)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1545)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.setRemoteUrl(CliGitAPIImpl.java:1179)
    at hudson.plugins.git.GitAPI.setRemoteUrl(GitAPI.java:160)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:805)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 46.952 sec <<< FAILURE! - in org.jenkinsci.plugins.pretestedintegration.integration.scm.git.MultipleScm_threeRepos_IT
oneReadyPlusTwoMasterConfiguration(org.jenkinsci.plugins.pretestedintegration.integration.scm.git.MultipleScm_threeRepos_IT)  Time elapsed: 46.184 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Didn't complete regexp match in build build2 trying to integrate repo3
    at org.jenkinsci.plugins.pretestedintegration.integration.scm.git.MultipleScm_threeRepos_IT.oneReadyPlusTwoMasterConfiguration(MultipleScm_threeRepos_IT.java:327)
groenborg commented 7 years ago

Update Chain

groenborg commented 7 years ago

WARNING: Failed to close down TCP port java.io.IOException: No such file or directory at sun.nio.ch.NativeThread.signal(Native Method) at sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292) at java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234) at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115) at hudson.TcpSlaveAgentListener.shutdown(TcpSlaveAgentListener.java:119) at jenkins.model.Jenkins.cleanUp(Jenkins.java:2862) at org.jvnet.hudson.test.JenkinsRule.after(JenkinsRule.java:461) at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:532) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

This stack trace should go away of we bump core further to 1.653 from 1.642.4 resource: https://issues.jenkins-ci.org/browse/JENKINS-33319?filter=10244

kryptag commented 7 years ago

https://bugs.eclipse.org/bugs/show_bug.cgi?id=460301 this might be relevant for us, because it might have an impact on our tests/test env

buep commented 7 years ago

@groenborg regarding the matrix comp test it was introduced much earlier than 2.4.1 version, and basically it was introduced by allowing the job type in Jenkins to be any type, instead of freestyle which enabled the use of matrix jobs. https://github.com/Praqma/pretested-integration-plugin/blob/master/src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/MatrixProjectCompatabilityTestIT.java I can't from the history see why this was decided, nor the reason for it in issues, because we clearly state it doesn't work as a concept.

Never the less, I see not reason for this test shouldn't work now as it worked earlier.

I think you need to look into the publisher step, which my might not any more be added automatically with the new git scm extension implementation.

We would like the test to run.

buep commented 7 years ago

@groenborg seems like Claus made rogue a decision of not adding the publisher.. search for this line to find the relevant code listener.getLogger().println(LOG_PREFIX + "MatrixConfiguration/sub - skipping publisher - leaving it to root job");

buep commented 7 years ago

looked at the commit: