I the 1.1b on Win2K, and tried to run
        java/test/src/org.apache.xindice.IntegrationEmbedTests.java

All 34 test cases were succeed.

I noticed that the master test suite calls CollectionTest.java, which
creates and drops collections. However, after above the unit test, I wrote
some code to exam all collections and found the db/system/SysSymbols is not
empty (as below). I would assume that after dropping a collection, all those
symbols associated with the collection should be dropped too.

Did I miss anything here?
Lixin

------------------ output of my code ------
---------- collections : ------system
---------- collections : ------SysConfig
---------- docs : ------database.xml
---------- collections : ------SysSymbols
---------- docs : ------system_SysConfig
---------- docs : ------testing
---------- docs : ------testing_current
---------- docs : ------testing_current_child1
---------- docs : ------testing_current_child2
---------- docs : ------testing_current_childcol
---------- docs : ------testing_current_colcount
---------- docs : ------testing_current_count
---------- docs : ------testing_current_droptwice
---------- docs : ------testing_current_duplicate
---------- docs : ------testing_current_getname
---------- docs : ------testing_current_nested
---------- docs : ------testing_current_nested_child2
---------- docs : ------testing_current_nested_child3
--------------------------------------------

----------------- my code ----------------
        // starts with 'db'
        private void iterateCollections(XmlDbClient client, String parent) {
                try {
                        iterateDocuments(client, parent);
                        String [] collections = client.listCollections(parent);
                        for (int i = 0; i < collections.length; i++) {
                                System.out.println("---------- collections : 
------" + collections[i]);
                                String childPath = parent + "/" + 
collections[i];
                                iterateCollections(client, childPath);
                        }
                } catch (Exception e) {
                        e.printStackTrace();
                }

        }

        private void iterateDocuments(XmlDbClient client, String path) {
                try {
                        String [] docs = client.listDocuments(path);
                        for (int i = 0; i < docs.length; i++) {
                                System.out.println("---------- docs : ------" + 
docs[i]);
                        }
                } catch (Exception e) {
                        // ignore it, especially for 'db' and 'db/system'
                }

        }

------------------------------------------

Reply via email to