Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 270162 - [ui] Artifact Repositories displayed multiple times in AdminUI
Summary: [ui] Artifact Repositories displayed multiple times in AdminUI
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 268627 271119 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-26 14:29 EDT by Matthew Piggott CLA
Modified: 2009-04-03 13:52 EDT (History)
3 users (show)

See Also:


Attachments
QueryableArtifactRepositoryManager patch (4.63 KB, patch)
2009-03-26 14:29 EDT, Matthew Piggott CLA
susan: iplog+
Details | Diff
QueryableRepositoryManager patch (5.41 KB, patch)
2009-03-26 14:59 EDT, Matthew Piggott CLA
susan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Piggott CLA 2009-03-26 14:29:39 EDT
Created attachment 129997 [details]
QueryableArtifactRepositoryManager patch

Artifact Repositories are currently displayed multiple times in the AdminUI,  when there are 2 repositories each repository is displayed twice, when there are 3 repositories each repository is displayed 3x, and so on.

It appears to be caused by a bug in QueryableArtifactRepositoryManager's query method.  It iterates over an array with query.perform but passes the array as an argument rather than an element.  Based on the comments & code it seems the loop is unnecessary so I've removed it.

Attached is a patch along with a test.
Comment 1 Matthew Piggott CLA 2009-03-26 14:59:52 EDT
Created attachment 130005 [details]
QueryableRepositoryManager patch

The patch makes getRepoLocations() abstract in QueryableRepositoryManager and adds implementations to the subclasses.  Previously QueryableRepositoryManager always used the flags for Metadata Repositories, currently this didn't cause a known issue but might int he future.
Comment 2 Susan McCourt CLA 2009-03-26 16:46:20 EDT
Reviewed and committed both patches.
Per discussion with Matt, we had to run the QueryableMetadataRepository tests before the artifact tests or else the testBrokenRepository would fail.  I'm not worried about figuring that out right now, but it suggests that some of the UI tests depend on previous repo manager state.

Fixed in HEAD >20090326.
Comment 3 Susan McCourt CLA 2009-03-29 22:01:27 EDT
*** Bug 268627 has been marked as a duplicate of this bug. ***
Comment 4 Peter Kirschner CLA 2009-04-03 13:52:26 EDT
*** Bug 271119 has been marked as a duplicate of this bug. ***