Community
Participate
Working Groups
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.
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?
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.
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.
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.
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.
I have the tests written and passing. I want to wait for my patch for Bug 256283 to be released to avoid collision.
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.).
Released, thanks Andrew.