Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-07-05 04:20:19 -0400
committerEike Stepper2011-07-05 04:20:19 -0400
commit3d5a474fa73ee5b8f271672652a74af9cf8b94f6 (patch)
tree8ec34ecaa5ab268c988bccb37f803577208234b8 /plugins
parente6b488fa576bbe269150e98da0ad7e7902e03f18 (diff)
downloadcdo-3d5a474fa73ee5b8f271672652a74af9cf8b94f6.tar.gz
cdo-3d5a474fa73ee5b8f271672652a74af9cf8b94f6.tar.xz
cdo-3d5a474fa73ee5b8f271672652a74af9cf8b94f6.zip
[350146] Make protocol timeout on the CDO server configurable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=350146
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionTest.java
index db378f76d8..0186f78164 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/TransactionTest.java
@@ -12,7 +12,10 @@
package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
import org.eclipse.emf.cdo.tests.model1.Category;
@@ -456,4 +459,25 @@ public class TransactionTest extends AbstractCDOTest
IOUtil.OUT().println("After transaction2.commit(): " + cdoCategory2.cdoRevision());
assertEquals(3, cdoCategory2.cdoRevision().getVersion());
}
+
+ public void testLongCommit() throws Exception
+ {
+ OMPlatform.INSTANCE.setDebugging(true);
+
+ IRepository repository = getRepository();
+ repository.addCommitInfoHandler(new CDOCommitInfoHandler()
+ {
+ public void handleCommitInfo(CDOCommitInfo commitInfo)
+ {
+ sleep(15L * 1000L);
+ }
+ });
+
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.getOrCreateResource(getResourcePath("/test1"));
+ resource.getContents().add(getModel1Factory().createCompany());
+
+ transaction.commit();
+ }
}

Back to the top