Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-11-18 05:13:26 -0500
committerEike Stepper2012-11-18 05:13:26 -0500
commit7990c8ae053c52f29080e036e307ca9d4ab23d07 (patch)
treeb5a873e43aa7d3254003ba58bab2d8dbc0807b04
parent123962851cf24bd54bb6c5d5b83a69697b997479 (diff)
downloadcdo-7990c8ae053c52f29080e036e307ca9d4ab23d07.tar.gz
cdo-7990c8ae053c52f29080e036e307ca9d4ab23d07.tar.xz
cdo-7990c8ae053c52f29080e036e307ca9d4ab23d07.zip
[393911] Create a complete offline and fail-over example suite
https://bugs.eclipse.org/bugs/show_bug.cgi?id=393911
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client3-failover/node.properties)4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client4-failover/node.properties)4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-monitor/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-group1/node.properties)2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-repository-1/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-participant1/node.properties)4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-repository-2/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-participant2/node.properties)4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-client-1/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client1-repo1/node.properties)4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-client-2/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client2-repo1/node.properties)4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-repo/node.properties (renamed from plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/repo1/node.properties)2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_319552_Test.java2
10 files changed, 27 insertions, 19 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client3-failover/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties
index 5f93e6eb0b..6bacd99070 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client3-failover/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties
@@ -1,7 +1,7 @@
#Node Settings
#Sat Nov 17 12:49:21 CET 2012
-Name=client3-failover
+Name=failover-client-1
BrowserPort=7780
Branch=MAIN
Type=Client
-Server=failover-group1
+Server=failover-monitor
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client4-failover/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties
index 4d5e5f8c1a..a9cd34e239 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client4-failover/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties
@@ -1,7 +1,7 @@
#Node Settings
#Sat Nov 17 12:49:27 CET 2012
-Name=client4-failover
+Name=failover-client-2
BrowserPort=7781
Type=Client
Branch=MAIN
-Server=failover-group1
+Server=failover-monitor
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-group1/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-monitor/node.properties
index 4b57ad6a80..071de47d31 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-group1/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-monitor/node.properties
@@ -1,5 +1,5 @@
#Node Settings
#Wed Nov 07 10:17:45 CET 2012
-Name=failover-group1
+Name=failover-monitor
Type=FailoverMonitor
Port=2040
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-participant1/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-repository-1/node.properties
index bf007a3845..bb3d89cfd7 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-participant1/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-repository-1/node.properties
@@ -1,7 +1,7 @@
#Node Settings
#Wed Nov 07 10:18:42 CET 2012
-Name=failover-participant1
+Name=failover-repository-1
Type=FailoverRepository
-Monitor=failover-group1
+Monitor=failover-monitor
Port=2041
BrowserPort=7782
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-participant2/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-repository-2/node.properties
index 75edaa1951..51306bca13 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-participant2/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-repository-2/node.properties
@@ -1,7 +1,7 @@
#Node Settings
#Wed Nov 07 10:18:51 CET 2012
-Name=failover-participant2
+Name=failover-repository-2
Type=FailoverRepository
-Monitor=failover-group1
+Monitor=failover-monitor
Port=2042
BrowserPort=7783
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client1-repo1/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-client-1/node.properties
index 743d46543b..f611bf432d 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client1-repo1/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-client-1/node.properties
@@ -1,7 +1,7 @@
#Node Settings
#Sat Nov 10 09:23:46 CET 2012
-Name=client1-repo1
+Name=normal-client-1
BrowserPort=7778
Type=Client
Branch=MAIN
-Server=repo1
+Server=normal-repo
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client2-repo1/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-client-2/node.properties
index 36dd019e98..ca435bc023 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/client2-repo1/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-client-2/node.properties
@@ -1,7 +1,7 @@
#Node Settings
#Sat Nov 10 09:03:23 CET 2012
-Name=client2-repo1
+Name=normal-client-2
BrowserPort=7779
Branch=MAIN
Type=Client
-Server=repo1
+Server=normal-repo
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/repo1/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-repo/node.properties
index 5b2be3fc4f..0c899cd71b 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/repo1/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/normal-repo/node.properties
@@ -1,6 +1,6 @@
#Node Settings
#Wed Nov 07 10:16:51 CET 2012
-Name=repo1
+Name=normal-repo
Type=NormalRepository
Port=2036
BrowserPort=7777
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
index a7b10ddc13..84e4c75b34 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
@@ -551,11 +551,17 @@ public abstract class SynchronizableRepository extends Repository.Default implem
{
setState(OFFLINE);
}
- // else if (type == BACKUP)
- // {
- // // setLastReplicatedBranchID(???);
- // setLastReplicatedCommitTime(getLastCommitTimeStamp());
- // }
+ else if (type == BACKUP)
+ {
+ if (getLastReplicatedCommitTime() == CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ boolean usedToBeMaster = getRootResourceID() != null;
+ if (usedToBeMaster)
+ {
+ setLastReplicatedCommitTime(getLastCommitTimeStamp());
+ }
+ }
+ }
startSynchronization();
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_319552_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_319552_Test.java
index 32c9f63007..d7db593f38 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_319552_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_319552_Test.java
@@ -78,6 +78,8 @@ public class Bugzilla_319552_Test extends AbstractSyncingTest
masterCompany.getName();
company.getName();
+ sleep(1000);
+
// check revision versions.
assertEquals(CDOUtil.getCDOObject(masterCompany).cdoRevision().getVersion(), CDOUtil.getCDOObject(company)
.cdoRevision().getVersion());

Back to the top