Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-07-06 01:18:55 -0400
committerEike Stepper2011-07-06 01:18:55 -0400
commitc5d31b6411dc2f6843ab1d7eb868d3a54b018f42 (patch)
treeac799787ac95679e3f9c7da9dd187aa5ccab5ff1 /plugins
parenta4cb4410f3369c14220ace73351cd3030fe14eb3 (diff)
downloadcdo-c5d31b6411dc2f6843ab1d7eb868d3a54b018f42.tar.gz
cdo-c5d31b6411dc2f6843ab1d7eb868d3a54b018f42.tar.xz
cdo-c5d31b6411dc2f6843ab1d7eb868d3a54b018f42.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.java25
1 files changed, 17 insertions, 8 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 0b2f6b1dca..0c2d3ea700 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
@@ -467,21 +467,30 @@ public class TransactionTest extends AbstractCDOTest
{
OMPlatform.INSTANCE.setDebugging(true);
- IRepository repository = getRepository();
- repository.addCommitInfoHandler(new CDOCommitInfoHandler()
+ CDOCommitInfoHandler handler = 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());
+ IRepository repository = getRepository();
+ repository.addCommitInfoHandler(handler);
- transaction.commit();
+ try
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.getOrCreateResource(getResourcePath("/test1"));
+ resource.getContents().add(getModel1Factory().createCompany());
+
+ transaction.commit();
+ }
+ finally
+ {
+ repository.removeCommitInfoHandler(handler);
+ }
}
public void _testLongCommit2() throws Exception

Back to the top