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

Bug 348412

Summary: [prefs] Preferences service fails CT (2/7)
Product: [Eclipse Project] Equinox Reporter: John Ross <jwross>
Component: CompendiumAssignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: 3.7   
Target Milestone: Juno M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 348455    
Attachments:
Description Flags
patch
none
patch none

Description John Ross CLA 2011-06-06 11:03:31 EDT
org.osgi.test.cases.prefs
org.osgi.test.cases.prefs.junit.PrefsControl
testRemovedNode(org.osgi.test.cases.prefs.junit.PrefsControl)
junit.framework.AssertionFailedError: removed

	at junit.framework.Assert.fail(Assert.java:47)

	at org.osgi.test.cases.prefs.junit.PrefsControl.runRemovedTests(PrefsControl.java:143)

	at org.osgi.test.cases.prefs.junit.PrefsControl.testRemovedNode(PrefsControl.java:57)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

	at java.lang.reflect.Method.invoke(Method.java:597)

	at junit.framework.TestCase.runTest(TestCase.java:164)

	at junit.framework.TestCase.runBare(TestCase.java:130)

	at junit.framework.TestResult$1.protect(TestResult.java:106)

	at junit.framework.TestResult.runProtected(TestResult.java:124)

	at junit.framework.TestResult.run(TestResult.java:109)

	at junit.framework.TestCase.run(TestCase.java:120)

	at junit.framework.TestSuite.runTest(TestSuite.java:230)

	at junit.framework.TestSuite.run(TestSuite.java:225)

	at junit.framework.TestSuite.runTest(TestSuite.java:230)

	at junit.framework.TestSuite.run(TestSuite.java:225)

	at aQute.junit.Activator.test(Activator.java:200)

	at aQute.junit.Activator.run(Activator.java:51)



testRemovedAncestor(org.osgi.test.cases.prefs.junit.PrefsControl)
junit.framework.AssertionFailedError: removed

	at junit.framework.Assert.fail(Assert.java:47)

	at org.osgi.test.cases.prefs.junit.PrefsControl.runRemovedTests(PrefsControl.java:143)

	at org.osgi.test.cases.prefs.junit.PrefsControl.testRemovedAncestor(PrefsControl.java:66)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

	at java.lang.reflect.Method.invoke(Method.java:597)

	at junit.framework.TestCase.runTest(TestCase.java:164)

	at junit.framework.TestCase.runBare(TestCase.java:130)

	at junit.framework.TestResult$1.protect(TestResult.java:106)

	at junit.framework.TestResult.runProtected(TestResult.java:124)

	at junit.framework.TestResult.run(TestResult.java:109)

	at junit.framework.TestCase.run(TestCase.java:120)

	at junit.framework.TestSuite.runTest(TestSuite.java:230)

	at junit.framework.TestSuite.run(TestSuite.java:225)

	at junit.framework.TestSuite.runTest(TestSuite.java:230)

	at junit.framework.TestSuite.run(TestSuite.java:225)

	at aQute.junit.Activator.test(Activator.java:200)

	at aQute.junit.Activator.run(Activator.java:51)
Comment 2 DJ Houghton CLA 2011-06-06 14:29:48 EDT
Created attachment 197440 [details]
patch

Definite bug. Not sure how we didn't catch this before! Fix is to check if the node has been removed before preforming the operation.
Comment 3 DJ Houghton CLA 2011-06-06 14:30:22 EDT
Marking as 3.8 but let me know if we need to release this sooner or in a maintenance branch.
Comment 4 John Ross CLA 2011-06-06 14:35:58 EDT
(In reply to comment #2)
> Created attachment 197440 [details]
> patch

Passes the CT with this patch.
Comment 5 Thomas Watson CLA 2011-06-06 14:38:43 EDT
Seems like a simple fix to include in 3.7.1.  I think it would be good since at some point we may want to send as many of our bundles through the OSGi certification process as possible.
Comment 6 DJ Houghton CLA 2011-06-07 16:27:31 EDT
Created attachment 197542 [details]
patch

Patch including tests and manifest version number updates.
Comment 7 DJ Houghton CLA 2011-06-07 16:28:17 EDT
Released to HEAD.