Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 257390 - [composite repo] "Good" composite repo examples have mistakes
Summary: [composite repo] "Good" composite repo examples have mistakes
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 M4   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 10:58 EST by Andrew Cattle CLA
Modified: 2008-12-05 16:45 EST (History)
0 users

See Also:


Attachments
Fixes mistakes in "good" composite xml examples (2.94 KB, patch)
2008-12-03 10:58 EST, Andrew Cattle CLA
no flags Details | Diff
Adds tests for loading (9.11 KB, patch)
2008-12-05 08:23 EST, Andrew Cattle CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cattle CLA 2008-12-03 10:58:21 EST
Created attachment 119391 [details]
Fixes mistakes in "good" composite xml examples

I noticed some mistakes in my "good" xml examples for composite repos.

Considering that these "good" examples won't even load properly, we should probably fix them.
Comment 1 DJ Houghton CLA 2008-12-03 12:28:31 EST
If these are examples of good repositories and you say they won't load correctly, then why aren't there test failures in the latest builds?

Comment 2 Andrew Cattle CLA 2008-12-03 12:37:35 EST
Because as far as I know nothing loads them. I test persistence by generating conent, saving it, then reloading it.

It was my understanding that the "good" files were there mostly for future reference.

If you'd like I can write some test cases that use them.
Comment 3 DJ Houghton CLA 2008-12-03 12:46:21 EST
We should either write tests which use the test data, or delete un-used test data. Otherwise, including the data is just adding unnecessary bulk.
Comment 4 Andrew Cattle CLA 2008-12-03 12:57:26 EST
Well like I said, the current testPersistence() test creates a composite repo, writes it, then reloads it. Do you think including a test case that loads the "good data" would be redundant? You could argue that all this test does is verify the writer is correct by assuming the reader is correct.
Comment 5 John Arthorne CLA 2008-12-03 15:15:54 EST
I don't think it would be redundant. What this tests is that we don't accidentally change the file format in an incompatible way. Say you added some attribute in the file format and updated both the reader and the writer. A test that just writes+reads will be successful because they were both updated. By having a test that reads some static test data, it ensures we are always able to read "old" repository files.
Comment 6 Andrew Cattle CLA 2008-12-03 15:53:53 EST
I have the tests written and passing. I want to wait for my patch for Bug 256283 to be released to avoid collision.
Comment 7 Andrew Cattle CLA 2008-12-05 08:23:59 EST
Created attachment 119615 [details]
Adds tests for loading

Same changes to the xml as the previous patch. Adds test cases to load data and verify the repository's state (children, properties, name, etc.).
Comment 8 John Arthorne CLA 2008-12-05 16:45:37 EST
Released, thanks Andrew.