[dna-commits] DNA SVN: r1473 - trunk/dna-jcr/src/test/java/org/jboss/dna/jcr.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Tue Dec 22 07:09:45 EST 2009


Author: bcarothers
Date: 2009-12-22 07:09:44 -0500 (Tue, 22 Dec 2009)
New Revision: 1473

Modified:
   trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/DnaTckTest.java
Log:
Added fix to avoid multi-workspace tests for single-workspace connectors.  This fixes the nightly integration build issue.

Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/DnaTckTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/DnaTckTest.java	2009-12-21 23:48:11 UTC (rev 1472)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/DnaTckTest.java	2009-12-22 12:09:44 UTC (rev 1473)
@@ -283,11 +283,14 @@
 
         session.logout();
 
-        session = helper.getRepository().login(creds, "otherWorkspace");
+        // If the repo only supports one workspace, stop here
+        if ("default".equals(this.workspaceName)) return;
+        
+        session = helper.getRepository().login(creds, this.workspaceName);
         testRead(session);
         try {
             testWrite(session);
-            fail("User 'defaultuser' should not have write access to 'otherWorkspace'");
+            fail("User 'defaultuser' should not have write access to '" + this.workspaceName + "'");
         } catch (AccessDeniedException expected) {
         }
         session.logout();
@@ -334,12 +337,15 @@
             // Expected
         }
         
-        session = helper.getRepository().login(creds, "otherWorkspace");
+        // If the repo only supports one workspace, stop here
+        if ("default".equals(this.workspaceName)) return;
 
+        session = helper.getRepository().login(creds, this.workspaceName);
+
         String[] workspaceNames = session.getWorkspace().getAccessibleWorkspaceNames();
 
         assertThat(workspaceNames.length, is(1));
-        assertThat(workspaceNames[0], is("otherWorkspace"));
+        assertThat(workspaceNames[0], is(this.workspaceName));
         
         session.logout();
     }



More information about the dna-commits mailing list