Bug 371873 - testApplyPatch_modifyFileApplyError failed in I20120216-2230
Summary: testApplyPatch_modifyFileApplyError 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 All
: P3 normal (vote)
Target Milestone: 0.4 RC2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL: http://download.eclipse.org/orion/dro...
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2012-02-17 06:38 EST by Tomasz Zarna CLA
Modified: 2012-02-17 10:13 EST (History)
2 users (show)

See Also:
Szymon.Brandys: review+


Attachments
Fix v01 (1.77 KB, patch)
2012-02-17 06:56 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (13.13 KB, application/octet-stream)
2012-02-17 06:56 EST, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2012-02-17 06:38:47 EST
expected:<201> but was:<500> 

java.lang.AssertionError: expected:<201> but was:<500>
at org.eclipse.orion.server.tests.servlets.git.GitApplyPatchTest.patch(GitApplyPatchTest.java:233)
at org.eclipse.orion.server.tests.servlets.git.GitApplyPatchTest.testApplyPatch_modifyFileApplyError(GitApplyPatchTest.java:219)
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 06:56:40 EST
Created attachment 211171 [details]
Fix v01

My bad, forgot that updated ApplyCommand[1] can throw now PatchFormatException or PatchApplyException. For the time being, they can be ignored, since there is no way to display them to the user[2].

[1] bug 371406
[2] bug 366008
Comment 2 Tomasz Zarna CLA 2012-02-17 06:56:43 EST
Created attachment 211172 [details]
mylyn/context/zip
Comment 3 Tomasz Zarna CLA 2012-02-17 06:58:38 EST
Ken or Simon, please review.
Comment 4 Tomasz Zarna CLA 2012-02-17 09:36:54 EST
(In reply to comment #3)
> Ken or Simon, please review.

Ignore that. It's RC2, +1 from another committer (Szymon) is enough.
Comment 5 Ken Walker CLA 2012-02-17 09:42:28 EST
This looks ok for the build but I'm guessing there needs to be work done in 0.5 ?
Comment 6 Tomasz Zarna CLA 2012-02-17 09:53:55 EST
(In reply to comment #5)
> there needs to be work done in 0.5 ?

Yes, it's bug 366008.
Comment 7 Szymon Brandys CLA 2012-02-17 09:57:42 EST
(In reply to comment #5)
> This looks ok for the build but I'm guessing there needs to be work done in 0.5
> ?

The fix looks ok and is safe. I agree with Ken there is work to do in .5 to improve error reporting in the ApplyPatch dialog. There is a separate bug for that (mentioned by Tomek already) which is blocked by a similar bug for improving error reporting in ZipImport dialog, see Bug 335890.
Comment 8 Tomasz Zarna CLA 2012-02-17 10:13:49 EST
Fixed with 1e1abaa4151b512b6a931c073830d2a9916128fc