Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 381837

Summary: Failure in GitCloneTest: expected:<[Error cloning git repository]> but was:<[/tmp/80525576121: not found.]>
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: GitAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 0.5   
Target Milestone: 0.5 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Malgorzata Janczarska CLA 2012-06-06 05:37:19 EDT
Failed in I201206052230. I think I've seen in before on my local machine, but I could not reproduce it running tests again. 

testCloneNotGitRepository:

expected:<[Error cloning git repository]> but was:<[/tmp/80525576121: not found.]>
org.junit.ComparisonFailure: expected:<[Error cloning git repository]> but was:<[/tmp/80525576121: not found.]>
at org.eclipse.orion.server.tests.servlets.git.GitCloneTest.testCloneNotGitRepository(GitCloneTest.java:274)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:501)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:259)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 John Arthorne CLA 2012-06-07 16:24:44 EDT
This isn't intermittent. It fails consistently when running with the latest JGit.
Comment 2 John Arthorne CLA 2012-06-07 16:49:10 EDT
The test is relying on the specific text of the message coming from JGit. JGit has been changing their exception code which caused this to change. Also the "main" exception being surfaced back to the caller is either our own message, or the JGit message if there is one. I think we should always prefer our own message because it is higher level and more meaningful to the end user (in this case, "Error cloning repository" versus "File not found"). 

I have released a fix in the hope of getting a clean RC1 build:

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=f3373dac3e48de6d6221c022d3a8930637841dd6

I will leave this bug open for Szymon or Gosia to sanity check my fix.
Comment 3 Malgorzata Janczarska CLA 2012-06-08 11:16:34 EDT
The fix is OK for now, but I will change it in RC2 to return more useful details to the user.
Comment 4 Malgorzata Janczarska CLA 2012-06-11 05:10:51 EDT
(In reply to comment #3)
> The fix is OK for now, but I will change it in RC2 to return more useful details
> to the user.
I added handling the new GitApiException to return more accurate information to the user.
"Invalid remote: origin" message is back in DetailedMessage. As much as I don't like asserting messages I have to admit that this is better than "/tmp/80525576121: not found." and the test helped us find it.