You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vg...@apache.org on 2004/03/04 14:15:22 UTC

cvs commit: xml-xindice/java/tests/src/org/apache/xindice/integration/client/basic CollectionTest.java

vgritsenko    2004/03/04 05:15:22

  Modified:    java/src/org/apache/xindice/client/xmldb/xmlrpc
                        CollectionImpl.java
               java/tests/src/org/apache/xindice/integration/client/basic
                        CollectionTest.java
  Log:
  Add collection close test
  
  Revision  Changes    Path
  1.48      +2 -5      xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java
  
  Index: CollectionImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- CollectionImpl.java	21 Feb 2004 02:11:23 -0000	1.47
  +++ CollectionImpl.java	4 Mar 2004 13:15:22 -0000	1.48
  @@ -502,7 +502,6 @@
   
           checkOpen();
           try {
  -
               Hashtable params = new Hashtable();
               params.put(RPCDefaultMessage.COLLECTION, collPath);
               params.put(RPCDefaultMessage.TYPE, queryLang);
  @@ -510,7 +509,6 @@
               params.put(RPCDefaultMessage.QUERY, query);
   
               if (name != null) {
  -
                   params.put(RPCDefaultMessage.NAME, name);
               }
   
  @@ -520,7 +518,6 @@
               Document resultDoc = dbf.newDocumentBuilder().parse(new InputSource(new StringReader(result)));
   
               ResourceSetImpl rs = new ResourceSetImpl(this, resultDoc);
  -
               return rs;
           } catch (Exception e) {
               e.printStackTrace();
  
  
  
  1.19      +7 -2      xml-xindice/java/tests/src/org/apache/xindice/integration/client/basic/CollectionTest.java
  
  Index: CollectionTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/tests/src/org/apache/xindice/integration/client/basic/CollectionTest.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- CollectionTest.java	24 Feb 2004 03:22:45 -0000	1.18
  +++ CollectionTest.java	4 Mar 2004 13:15:22 -0000	1.19
  @@ -245,4 +245,9 @@
           this.client.dropCollection(TEST_COLLECTION_PATH, "colcount");
           assertEquals(0, col.getChildCollectionCount());
       }
  +
  +    public void testClose() throws Exception {
  +        Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
  +        col.close();
  +    }
   }