Community
Participate
Working Groups
Created attachment 133909 [details] ss Using the I2TP1 candidate Build: TPTP-4.6.0-200904260100 1: Create a regular JUnit Test Case 2: Swtich to logical view of test prospective 3: Expand the source folder containing the newly created JUnit test (.java) 4: Notice the duplicate, both of which point to the same object. There are no error message in the error log during the above precedure
Jerome, please triage and size.
i'd say 2 to 3 days
*** Bug 164486 has been marked as a duplicate of this bug. ***
After an initialize investigation, the org.eclipse.hyades.test.ui.internal.navigator.proxy.FileProxyNodeCache is caching two instances of the org.eclipse.hyades.test.tools.ui.java.internal.junit.navigator.JavaElementProxyNode since the IFile is a different object instance despite pointing to the same resource. One solution could be to cache the absolute path of the resource, instead of the IFile object instance.
Reproducible in TPTP-4.6.0-200906191311
Created attachment 143019 [details] Partial Patch.
some points to note : .this bug do not always occur .after some testing, it only occur on Regular JUnit test Case (and not on testsuite) .when you close/reopen workspace, all is well displayed to be sure to reproduce it, make theses steps : . switch to test perspective . switch to logical view and stay in it . create a new test case, you will see it appear 2 times in tree viewer it seems that proxy node cache is innocent (i made a special map to store them, indexed by full path : it changes nothing) checking inside logical viewer to try to find what is really happening
Created attachment 143144 [details] patch add on this patch complete previous one when you create a regular junit test case element, a .java file is created. at this moment, its proxy is created. just after, this java file is updated and proxy is re-created problem is that there is a particular mecanism to store children of java element proxy that was bugged : it was adding the updated proxy as a new child instead of updating the old version fix = compare resource instead of compare proxy pointer to add new child. if resource is the same, update proxy if it is different. with this fix, problem no longer occur
updating worked hours Paul, could you review it please ? thanks in advance
Reviewed and approved. Jerome, please create a new test case for this scenario (see comment #8).
patch and test case pushed under CVS after approval
verified: duplication gone driver: TPTP-4.7.0M7-201005041505
Closing after verification