Bug 229595 - OptionTests.testBug68993() failing due to wrong assumption
Summary: OptionTests.testBug68993() failing due to wrong assumption
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 07:37 EDT by Jerome Lanneluc CLA
Modified: 2008-05-02 05:26 EDT (History)
3 users (show)

See Also:


Attachments
Fix for the test (1.33 KB, patch)
2008-04-30 08:59 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2008-04-30 07:37:34 EDT
I20080430-0100

org.eclipse.jdt.core.tests.model.OptionTests.testBug68993() now fails because the registered INodeChangeListener is no longer notified when the preferences file is removed (see ProjectPreferences.deleted(IFile))

I believe the bug was introduced by the fix for bug 137398.

This is a regression comparing to I20080429-0100.
Comment 1 Szymon Brandys CLA 2008-04-30 08:01:58 EDT
It is true that this problem is caused by the bug 137398 fix. It is not a regression though, since the steps from bug 68993 doesn't cause the error on Eclipse with this fix.

We agreed with Jerome, that the test for bug 68993 doesn't test the initial issue accurately.
Comment 2 Jerome Lanneluc CLA 2008-04-30 08:55:24 EDT
Thanks Szymon. Indeed the test assumed that the preference file would be removed when resetting the options. This assumption was incorrect. Changing title accordingly.
Comment 3 Jerome Lanneluc CLA 2008-04-30 08:59:02 EDT
Created attachment 98152 [details]
Fix for the test

The test was assuming that the preference file was deleted, and thus that the IEclipsePreferences instance would be reset. This is no longer true. All we need to test is that the IEclipsePreferences instance is empty.
Comment 4 Jerome Lanneluc CLA 2008-04-30 09:08:07 EDT
Fix released for 3.4M7
Comment 5 Maxime Daniel CLA 2008-04-30 09:27:46 EDT
Passes with HEAD. Waiting for next build to verify...
Comment 6 Maxime Daniel CLA 2008-05-02 05:26:14 EDT
Verified for 3.4 M7 using build I20080502-0100.