jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1729393 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
Date Tue, 09 Feb 2016 14:32:33 GMT
Author: reschke
Date: Tue Feb  9 14:32:32 2016
New Revision: 1729393

URL: http://svn.apache.org/viewvc?rev=1729393&view=rev
Log:
OAK-3949: fix DbClusterTestJCR3162 to restore system property SYSTEM_PROPERTY_NODE_ID to previous
value (ported to 2.4)

Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  9 14:32:32 2016
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1225179,1225191,1225196,1225207,1225525,1225528,1226452,1226472,1226515,1226750,1226863,1227171,1227240,1227590,1227593,1227615,1228058,1228149,1228155,1228160,1230507,1230681,1230688,1231204,1232035,1232100,1232404,1232831,1232920,1232922,1233069,1233344,1233446,1233468,1233471,1233544,1234807,1235192,1235375,1235423,1236709,1236775,1236819-1236821,1240053,1241461,1242775,1245443,1291424,1296202,1296226,1297526,1298428,1301046,1301397,1302401,1303438,1304323,1304382,1306337,1307456,1309908,1311861,1324713,1327180,1327432,1327926,1329198,1334998,1335017,1335030,1336017,1336252,1338172,1341373,1346045,1348860,1349185,1352440,1352791,1353920,1354499,1358543,1360013,1360571,1361941,1362796,1362924,1367057,1368796,1399576,1400843,1400935,1403408,1403768,1415093,1415574,1416387,1416863,1418236,1437374,1437384,1437618,1437963,1438158,1439346,1439797,1444755,1445122,1461064,1461137,1461613,1462115,1462153,1462205,1462211,1466060,146
 6085,1466938,1467255,1467363,1469312,1469799,1469892,1469940,1470573,1471286,1475718,1478684,1479518,1487803,1497492,1498840,1498850,1499285,1505795,1505907,1505942,1506594,1508053,1509101,1517602,1517627,1517711,1519376,1526945,1530005,1535539,1537027,1556248,1582373,1634584,1680757
+/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1225179,1225191,1225196,1225207,1225525,1225528,1226452,1226472,1226515,1226750,1226863,1227171,1227240,1227590,1227593,1227615,1228058,1228149,1228155,1228160,1230507,1230681,1230688,1231204,1232035,1232100,1232404,1232831,1232920,1232922,1233069,1233344,1233446,1233468,1233471,1233544,1234807,1235192,1235375,1235423,1236709,1236775,1236819-1236821,1240053,1241461,1242775,1245443,1291424,1296202,1296226,1297526,1298428,1301046,1301397,1302401,1303438,1304323,1304382,1306337,1307456,1309908,1311861,1324713,1327180,1327432,1327926,1329198,1334998,1335017,1335030,1336017,1336252,1338172,1341373,1346045,1348860,1349185,1352440,1352791,1353920,1354499,1358543,1360013,1360571,1361941,1362796,1362924,1367057,1368796,1399576,1400843,1400935,1403408,1403768,1415093,1415574,1416387,1416863,1418236,1437374,1437384,1437618,1437963,1438158,1439346,1439797,1444755,1445122,1461064,1461137,1461613,1462115,1462153,1462205,1462211,1466060,146
 6085,1466938,1467255,1467363,1469312,1469799,1469892,1469940,1470573,1471286,1475718,1478684,1479518,1487803,1497492,1498840,1498850,1499285,1505795,1505907,1505942,1506594,1508053,1509101,1517602,1517627,1517711,1519376,1526945,1530005,1535539,1537027,1556248,1582373,1634584,1680757,1729382

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java?rev=1729393&r1=1729392&r2=1729393&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/DbClusterTestJCR3162.java
Tue Feb  9 14:32:32 2016
@@ -57,6 +57,8 @@ public class DbClusterTestJCR3162 extend
     private String clusterId1 = UUID.randomUUID().toString();
     private String clusterId2 = UUID.randomUUID().toString();
 
+    private String prevClusterId;
+
     public void setUp() throws Exception {
         deleteAll();
         server1 = Server.createTcpServer("-tcpPort", "9001", "-baseDir",
@@ -74,7 +76,7 @@ public class DbClusterTestJCR3162 extend
                                 "./src/test/resources/org/apache/jackrabbit/core/cluster/repository-h2.xml"),
                         new File("./target/dbClusterTest/node2/repository.xml"));
 
-        System.setProperty(ClusterNode.SYSTEM_PROPERTY_NODE_ID, clusterId1);
+        prevClusterId = System.setProperty(ClusterNode.SYSTEM_PROPERTY_NODE_ID, clusterId1);
         rep1 = RepositoryImpl.create(RepositoryConfig.create(new File(
                 "./target/dbClusterTest/node1")));
 
@@ -83,6 +85,14 @@ public class DbClusterTestJCR3162 extend
     }
 
     public void tearDown() throws Exception {
+        // revert change to system property
+        if (prevClusterId == null) {
+            System.clearProperty(ClusterNode.SYSTEM_PROPERTY_NODE_ID);
+        }
+        else {
+            System.setProperty(ClusterNode.SYSTEM_PROPERTY_NODE_ID, prevClusterId);
+        }
+
         try {
             rep1.shutdown();
             if (rep2 != null) {

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java?rev=1729393&r1=1729392&r2=1729393&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/config/RepositoryConfigTest.java
Tue Feb  9 14:32:32 2016
@@ -245,6 +245,10 @@ public class RepositoryConfigTest extend
     public void testAutomaticClusterNodeIdCreation() throws Exception {
         final long syncDelay = 12;
 
+        assertNull(
+                "This test requires the system property " + ClusterNode.SYSTEM_PROPERTY_NODE_ID
+ " not to be set; found value: "
+                        + System.getProperty(ClusterNode.SYSTEM_PROPERTY_NODE_ID) + " (leftover
from broken unit test?)",
+                System.getProperty(ClusterNode.SYSTEM_PROPERTY_NODE_ID));
         System.setProperty("cluster.syncDelay", Long.toString(syncDelay));
         try {
             File file = new File(DIR, "cluster_node.id");



Mime
View raw message