jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r718214 - in /jackrabbit/branches/1.5: ./ jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/
Date Mon, 17 Nov 2008 10:34:00 GMT
Author: jukka
Date: Mon Nov 17 02:33:58 2008
New Revision: 718214

URL: http://svn.apache.org/viewvc?rev=718214&view=rev
Log:
1.5: Merged revision 713037 (JCR-1851). Ignored revisions 712984 and 712985.

Modified:
    jackrabbit/branches/1.5/   (props changed)
    jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/Helper.java
    jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/RepositoryServiceTest.java
    jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/SessionInfoTest.java

Propchange: jackrabbit/branches/1.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 17 02:33:58 2008
@@ -1,2 +1,2 @@
 /jackrabbit/branches/1.3:631261
-/jackrabbit/trunk:703899-704158,704165,704167,704324,704358,704361,704864,704933,704939,705010,705033,705243,705496,705522,705579,705925,705932,705934,705937-705938,705961,706242,706273,706285-706286,706562,706606,706649,706655,706660,706697,706918,707303-707304,707307,707310,707630,708206,708598,708609,708613,708619,708634,708840,708863,708909,708929,708943,709115,709142,709207,709211,710047,711238,711566-711567,711595,711841-711843
+/jackrabbit/trunk:703899-704158,704165,704167,704324,704358,704361,704864,704933,704939,705010,705033,705243,705496,705522,705579,705925,705932,705934,705937-705938,705961,706242,706273,706285-706286,706562,706606,706649,706655,706660,706697,706918,707303-707304,707307,707310,707630,708206,708598,708609,708613,708619,708634,708840,708863,708909,708929,708943,709115,709142,709207,709211,710047,711238,711566-711567,711595,711841-711843,712984-712985,713037

Modified: jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/Helper.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/Helper.java?rev=718214&r1=718213&r2=718214&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/Helper.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/Helper.java
Mon Nov 17 02:33:58 2008
@@ -101,14 +101,16 @@
     public SessionInfo getAdminSessionInfo() throws RepositoryException {
         // force assignment of repoStub
         getRepositoryService();
-        String wspName = repoServiceStub.getProperty(RepositoryServiceStub.PROP_WORKSPACE);
+        String propName = RepositoryServiceStub.PROP_PREFIX + "." + RepositoryServiceStub.PROP_WORKSPACE;
+        String wspName = repoServiceStub.getProperty(propName);
         return getRepositoryService().obtain(getAdminCredentials(), wspName);
     }
 
     public SessionInfo getReadOnlySessionInfo() throws RepositoryException {
         // force assignment of repoStub
         getRepositoryService();
-        String wspName = repoServiceStub.getProperty(RepositoryServiceStub.PROP_WORKSPACE);
+        String propName = RepositoryServiceStub.PROP_PREFIX + "." + RepositoryServiceStub.PROP_WORKSPACE;
+        String wspName = repoServiceStub.getProperty(propName);
         return getRepositoryService().obtain(getReadOnlyCredentials(), wspName);
     }
 }
\ No newline at end of file

Modified: jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/RepositoryServiceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/RepositoryServiceTest.java?rev=718214&r1=718213&r2=718214&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/RepositoryServiceTest.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/RepositoryServiceTest.java
Mon Nov 17 02:33:58 2008
@@ -58,7 +58,18 @@
         assertTrue("Workspace names must contain at least a single workspace", workspaceNames.length
> 0);
 
         String wspName = getProperty(RepositoryServiceStub.PROP_WORKSPACE);
-        assertTrue("Workspace name used for retrieving the SessionInfo must be included in
the available workspaces.", Arrays.asList(workspaceNames).contains(wspName));
+        if (wspName != null) {
+            assertTrue("Workspace name used for retrieving the SessionInfo must be included
in the available workspaces.", Arrays.asList(workspaceNames).contains(wspName));
+        }
+    }
+
+    public void testNullWorkspaceName() throws RepositoryException {
+        SessionInfo sInfo = service.obtain(helper.getAdminCredentials(), null);
+        try {
+            assertNotNull(sInfo.getWorkspaceName());
+        } finally {
+            service.dispose(sInfo);
+        }
     }
 
     // TODO: add more tests

Modified: jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/SessionInfoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/SessionInfoTest.java?rev=718214&r1=718213&r2=718214&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/SessionInfoTest.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-spi/src/test/java/org/apache/jackrabbit/spi/SessionInfoTest.java
Mon Nov 17 02:33:58 2008
@@ -42,7 +42,11 @@
     }
 
     public void testGetWorkspaceName() {
-        assertEquals(workspaceName, sessionInfo.getWorkspaceName());
+        if (workspaceName == null) {
+            assertNotNull(sessionInfo.getWorkspaceName());
+        } else {
+            assertEquals(workspaceName, sessionInfo.getWorkspaceName());
+        }
     }
 
     // TODO: add more tests



Mime
View raw message