chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1373281 - in /chemistry/opencmis/trunk: chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test...
Date Wed, 15 Aug 2012 09:21:45 GMT
Author: jens
Date: Wed Aug 15 09:21:45 2012
New Revision: 1373281

URL: http://svn.apache.org/viewvc?rev=1373281&view=rev
Log:
InMemory: fix isLatestVersion when object is checked out, set PWC to latest version
TCK: re-enable disabled test

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/versioning/VersioningSmokeTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java?rev=1373281&r1=1373280&r2=1373281&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
Wed Aug 15 09:21:45 2012
@@ -135,11 +135,7 @@ public class DocumentVersionImpl extends
     private boolean isLatestVersion() {
         List<DocumentVersion> allVers = fContainer.getAllVersions();
         boolean isLatestVersion;
-        if (isPwc()) {
-            isLatestVersion = allVers.size() > 1 && allVers.get(allVers.size()
- 2).equals(this);
-        } else {
-            isLatestVersion = allVers.get(allVers.size() - 1).equals(this);
-        }
+        isLatestVersion = allVers.get(allVers.size() - 1).equals(this);
         return isLatestVersion;
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java?rev=1373281&r1=1373280&r2=1373281&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
Wed Aug 15 09:21:45 2012
@@ -514,8 +514,7 @@ public class VersioningTest extends Abst
         PropertyBoolean pdb = (PropertyBoolean) props.get(PropertyIds.IS_LATEST_VERSION);
         assertNotNull(pdb);
         boolean bVal = pdb.getFirstValue();
-        assertEquals(versioningState != VersioningState.CHECKEDOUT, bVal); // if
-        // checked out it isn't the latest version
+        assertTrue(bVal); 
 
         pdb = (PropertyBoolean) props.get(PropertyIds.IS_MAJOR_VERSION);
         assertNotNull(pdb);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/versioning/VersioningSmokeTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/versioning/VersioningSmokeTest.java?rev=1373281&r1=1373280&r2=1373281&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/versioning/VersioningSmokeTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/versioning/VersioningSmokeTest.java
Wed Aug 15 09:21:45 2012
@@ -81,9 +81,9 @@ public class VersioningSmokeTest extends
             checkCheckedOut(pwc);
 
             // check version series
-            // addResult(checkVersionSeries(session,
-            // pwc.getAllVersions(SELECT_ALL_NO_CACHE_OC), propertiesToCheck,
-            // "Test version series after check out"));
+             addResult(checkVersionSeries(session,
+             pwc.getAllVersions(SELECT_ALL_NO_CACHE_OC), propertiesToCheck,
+             "Test version series after check out"));
 
             // cancel checkout
             pwc.cancelCheckOut();



Mime
View raw message