Bug 371881 - testForcedFetch and testForcedPush failed in I20120216-2230
Summary: testForcedFetch and testForcedPush failed in I20120216-2230
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Git (show other bugs)
Version: 0.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.4 RC3   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL: http://download.eclipse.org/orion/dro...
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2012-02-17 08:08 EST by Tomasz Zarna CLA
Modified: 2012-02-22 10:02 EST (History)
2 users (show)

See Also:
Szymon.Brandys: review+
ken_walker: review+


Attachments
Tests improvement (1.54 KB, patch)
2012-02-17 08:26 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (15.27 KB, application/octet-stream)
2012-02-17 08:26 EST, Tomasz Zarna CLA
no flags Details
mylyn/context/zip (6.34 KB, application/octet-stream)
2012-02-20 06:21 EST, Tomasz Zarna CLA
no flags Details
Overwrite system settings (4.60 KB, patch)
2012-02-20 07:17 EST, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2012-02-17 08:08:19 EST
testForcedPush Error expected:<true> but was:<false> 

java.lang.AssertionError: expected:<true> but was:<false>
at org.eclipse.orion.server.tests.servlets.git.GitPushTest.testForcedPush(GitPushTest.java:766)
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:352)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
at org.eclipse.core.launcher.Main.main(Main.java:34)
 
 
testForcedFetch Error expected:<true> but was:<false> 

java.lang.AssertionError: expected:<true> but was:<false>
at org.eclipse.orion.server.tests.servlets.git.GitFetchTest.testForcedFetch(GitFetchTest.java:608)
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:352)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 Tomasz Zarna CLA 2012-02-17 08:17:26 EST
They both fail expecting forced push to succeed.
Comment 2 Tomasz Zarna CLA 2012-02-17 08:26:38 EST
Created attachment 211177 [details]
Tests improvement

I couldn't get them fail when run locally and doing a forced push on orion.eclipse.org worked just fine.

I could make the failing tests display more details on failure (ie ServerStatus), see attached patch. I still a +1 for the change, right?
Comment 3 Tomasz Zarna CLA 2012-02-17 08:26:41 EST
Created attachment 211178 [details]
mylyn/context/zip
Comment 4 Ken Walker CLA 2012-02-17 09:22:22 EST
Giving this a +1 as project lead
Comment 5 Tomasz Zarna CLA 2012-02-17 09:35:03 EST
Thx, increased tests verbosity in 53bb182e13912f313ca280acd046cc6acac3d884
Comment 6 Tomasz Zarna CLA 2012-02-17 10:59:54 EST
We have more details now from http://download.eclipse.org/orion/drops/I201202171033/org.eclipse.orion.server.tests.AllServerTests.html :

{
"Severity":"Warning",
"Message":"REJECTED_OTHER_REASON",
"HttpCode":500,
"Code":0,
"JsonData":
	{
	"Severity":"Warning",
	"Message":"REJECTED_OTHER_REASON",
	"HttpCode":500,
	"Code":0,
	"DetailedMessage":"non-fast forward"
	}
}
Comment 7 Tomasz Zarna CLA 2012-02-17 11:06:23 EST
Weird, we're forcing the push so "not-fast forward" shouldn't be an issue. Moreover, why it's REJECTED_OTHER_REASON with "non-fast forward" message rather than REJECTED_NONFASTFORWARD?
Comment 8 John Arthorne CLA 2012-02-17 14:04:09 EST
Aha, I bet this is related to bug 343150. The system settings was changed to receive.denyNonFastForward=true just this week. We should be able to override this setting in the local repository, shouldn't we?
Comment 9 Tomasz Zarna CLA 2012-02-20 06:21:06 EST
Created attachment 211267 [details]
mylyn/context/zip
Comment 10 Tomasz Zarna CLA 2012-02-20 06:34:46 EST
(In reply to comment #8)
> The system settings was changed to receive.denyNonFastForward=true

Hmm, that would explain a lot, but setting the option [1] locally [2] doesn't seem to harm the failing tests. They all pass.

[1] "git config --system receive.denyNonFastforwards true" as root and verified with "git config --system --list" as a regular user
[2] I'm on RHEL 5.7 with git 1.7.4.1
Comment 11 Tomasz Zarna CLA 2012-02-20 07:17:26 EST
Created attachment 211269 [details]
Overwrite system settings

The good news is that when I set the option in the temp repo that is cloned when running tests they failed with the exact same message. 

The patch contains two changes:
1. in GitTest imitate the same setup as on eclipse.org when running tests locally
2. in GitFetchTest#testForcedFetch and GitPushTest#testForcedPush overwrite the "system" setting in the cloned repo: enable non fastforwards

So, having 1, without 2 applied makes tests fail the same way they do on eclipse.org. Hopefully, having them both applied will make all tests green again.
Comment 12 Ken Walker CLA 2012-02-20 09:05:00 EST
Great! This is a fix we want in for sure.  We need a reviewer and Simon or Me to sign off on it.
Comment 13 Szymon Brandys CLA 2012-02-22 05:41:31 EST
Looks good.
Comment 14 Ken Walker CLA 2012-02-22 09:48:46 EST
As a project lead I +1 this for RC3

Code looks good, fix was tested local by team mirroring the eclipse.org settings and failure without patch and passed with patch.
Comment 15 Tomasz Zarna CLA 2012-02-22 10:02:57 EST
Thanks guys, the latest patch has been pushed as 029895faf37e80429c2795723e91a2488c802d69