Bug 409707

Summary: PropertiesFileQuickAssistTest.testRemoveProperty3 and testRemoveProperty4 failed
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, markus.kell.r
Version: 4.3Keywords: test
Target Milestone: 4.4 M4   
Hardware: All   
OS: All   
Whiteboard:

Description Dani Megert CLA 2013-06-03 05:48:09 EDT
I20130531-2000.

PropertiesFileQuickAssistTest.testRemoveProperty3 and testRemoveProperty4 failed.

http://download.eclipse.org/eclipse/downloads/drops4/I20130531-2000/testresults/html/org.eclipse.jdt.ui.tests_macosx.cocoa.x86_5.0.html


nls file expected:<... static String Test_[]2; } > but was:<... static String Test_[1; public static String Test_]2; } >

junit.framework.ComparisonFailure: nls file expected:<... static String Test_[]2;
}
> but was:<... static String Test_[1;
public static String Test_]2;
}
>
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.assertEqualLines(PropertiesFileQuickAssistTest.java:153)
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.checkContentOfCu(PropertiesFileQuickAssistTest.java:124)
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.testRemoveProperty3(PropertiesFileQuickAssistTest.java:641)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3976)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3653)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)


nls file expected:<... static String Test_[]5; public static...> but was:<... static String Test_[3; public static String Test_4; public static String Test_]5; public static...>

junit.framework.ComparisonFailure: nls file expected:<... static String Test_[]5;
public static...> but was:<... static String Test_[3;
public static String Test_4;
public static String Test_]5;
public static...>
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.assertEqualLines(PropertiesFileQuickAssistTest.java:153)
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.checkContentOfCu(PropertiesFileQuickAssistTest.java:124)
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.testRemoveProperty4(PropertiesFileQuickAssistTest.java:709)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3976)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3653)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 Markus Keller CLA 2013-06-03 10:20:23 EDT
http://download.eclipse.org/eclipse/downloads/drops4/I20130531-2000/testresults/macosx.cocoa.x86_5.0/org.eclipse.jdt.ui.tests.AutomatedSuite.txt says the reason is that one of the files is out of sync with the local file system.

I can't explain why that could happen -- the tests only manipulate files through IFile and ICompilationUnit.

Closing this bug for now, since it didn't happen again in subsequent builds. May reopen if it turns out happen more often.


!ENTRY org.eclipse.jdt.ui 4 10001 2013-06-01 05:01:20.318
!MESSAGE Internal Error
!STACK 1
org.eclipse.core.runtime.CoreException: The file is not synchronized with the local file system.
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:338)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:325)
	at org.eclipse.ltk.core.refactoring.TextFileChange.commit(TextFileChange.java:233)
	at org.eclipse.ltk.core.refactoring.TextChange.perform(TextChange.java:240)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.jdt.ui.text.java.correction.ChangeCorrectionProposal.performChange(ChangeCorrectionProposal.java:185)
	at org.eclipse.jdt.ui.text.java.correction.ChangeCorrectionProposal.apply(ChangeCorrectionProposal.java:113)
	at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.testRemoveProperty3(PropertiesFileQuickAssistTest.java:626)
...
Comment 2 Dani Megert CLA 2013-07-11 05:13:21 EDT
PropertiesFileQuickAssistTest.testRemoveProperty2 failed again in N20130710-2000 - this time on Windows 7. This time, only a deletion failure was logged.
Comment 3 Dani Megert CLA 2013-07-11 05:15:38 EDT
(In reply to comment #2)
> PropertiesFileQuickAssistTest.testRemoveProperty2 failed again in
> N20130710-2000 - this time on Windows 7. This time, only a deletion failure
> was logged.

Other components also show unexpected failures, so, this was probably just a bad day for the build machine.
Comment 4 Dani Megert CLA 2013-12-10 08:52:56 EST
PropertiesFileQuickAssistTest.testRemoveProperty4 failed again on Windows 7:

http://download.eclipse.org/eclipse/downloads/drops4/I20131209-2000/testresults/html/org.eclipse.jdt.ui.tests_win32.win32.x86_7.0.html

This time, no other tests failed unexpectedly.


Wrong number of proposals, is: 0, expected: 1

junit.framework.AssertionFailedError: Wrong number of proposals, is: 0, expected: 1

at org.eclipse.jdt.ui.tests.quickfix.QuickFixTest.assertNumberOfProposals(QuickFixTest.java:436)
at org.eclipse.jdt.ui.tests.quickfix.PropertiesFileQuickAssistTest.testRemoveProperty4(PropertiesFileQuickAssistTest.java:687)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:657)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1122)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:146)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:565)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 5 Markus Keller CLA 2013-12-10 14:33:10 EST
The problem in testRemoveProperty4() is a race condition with PropertiesFileEditor#fAccessorTypes, which was added in bug 361535.

To reproduce, just add a breakpoint in PropertiesFileEditor.java:132

PropertiesFileEditor#getAccessorType() cannot assume the job is always done. It has to join fJob to be sure.

Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=e0bbf7568d196788ff118465b93f6463dcc2026b