Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-11-18 05:15:00 -0500
committerEike Stepper2012-11-18 05:15:00 -0500
commit6848d5d3f5ac22e530b0489bf2360dfaa0cf2121 (patch)
treef2e8dde90786a8af171b00dffed1ffe450a41ffe
parent7990c8ae053c52f29080e036e307ca9d4ab23d07 (diff)
downloadcdo-6848d5d3f5ac22e530b0489bf2360dfaa0cf2121.tar.gz
cdo-6848d5d3f5ac22e530b0489bf2360dfaa0cf2121.tar.xz
cdo-6848d5d3f5ac22e530b0489bf2360dfaa0cf2121.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.tests/src/org/eclipse/emf/cdo/tests/offline/Bugzilla_319552_Test.java19
1 files changed, 12 insertions, 7 deletions
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 d7db593f38..395543b79c 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
@@ -47,7 +47,7 @@ public class Bugzilla_319552_Test extends AbstractSyncingTest
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.createResource(getResourcePath("/my/resource"));
- Company company = getModel1Factory().createCompany();
+ final Company company = getModel1Factory().createCompany();
resource.getContents().add(company);
transaction.setCommitComment("resource with one company created on clone");
transaction.commit();
@@ -56,7 +56,7 @@ public class Bugzilla_319552_Test extends AbstractSyncingTest
waitForOffline(clone);
// do some online changes to increase the revision.
- Company masterCompany = (Company)masterTransaction.getObject(CDOUtil.getCDOObject(company).cdoID());
+ final Company masterCompany = (Company)masterTransaction.getObject(CDOUtil.getCDOObject(company).cdoID());
masterCompany.setName("revision2");
masterTransaction.commit();
@@ -78,10 +78,15 @@ 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());
+ new PollingTimeOuter()
+ {
+ @Override
+ protected boolean successful()
+ {
+ // check revision versions.
+ return CDOUtil.getCDOObject(masterCompany).cdoRevision().getVersion() == CDOUtil.getCDOObject(company)
+ .cdoRevision().getVersion();
+ }
+ }.assertNoTimeOut();
}
}

Back to the top