Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2019-10-22 06:36:25 -0400
committerEike Stepper2019-10-22 06:36:25 -0400
commit699dc28c60077dc2c85ca9c0c3176219fd18882f (patch)
treed8f77d8a27ef5a57233b1f069770ae769d7f0aaf
parentfd75faf864e6584fbf56a8eca702b20a805abb62 (diff)
downloadcdo-699dc28c60077dc2c85ca9c0c3176219fd18882f.tar.gz
cdo-699dc28c60077dc2c85ca9c0c3176219fd18882f.tar.xz
cdo-699dc28c60077dc2c85ca9c0c3176219fd18882f.zip
[551071] Implement binary server export/import
https://bugs.eclipse.org/bugs/show_bug.cgi?id=551071
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java13
2 files changed, 12 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
index 97ae97afec..9aa6e4b100 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
@@ -999,7 +999,7 @@ public abstract class CDOServerExporter<OUT>
@Override
public CDOPermissionProvider getPermissionProvider()
{
- return CDOPermissionProvider.READ;
+ return CDOPermissionProvider.WRITE;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
index a4a652ffed..3262846794 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/BackupTest.java
@@ -124,6 +124,7 @@ public class BackupTest extends AbstractCDOTest
{
CDOSession session2 = openSession(repoName);
CDOTransaction transaction2 = session2.openTransaction();
+ transaction2.getResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
// Read all repo contents
TreeIterator<EObject> iter = transaction2.getRootResource().getAllContents();
@@ -143,6 +144,11 @@ public class BackupTest extends AbstractCDOTest
private void doExportImport() throws Exception, CommitException
{
+ doExportImport(true);
+ }
+
+ private void doExportImport(boolean useAfterImport) throws Exception, CommitException
+ {
InternalRepository repo1 = getRepository();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -157,7 +163,10 @@ public class BackupTest extends AbstractCDOTest
CDOServerImporter importer = createImporter(repo2);
importer.importRepository(bais);
- useAfterImport("repo2");
+ if (useAfterImport)
+ {
+ useAfterImport("repo2");
+ }
}
@CleanRepositoriesBefore(reason = "Inactive repository required")
@@ -314,7 +323,7 @@ public class BackupTest extends AbstractCDOTest
transaction.commit();
session.close();
- doExportImport();
+ doExportImport(false);
CDOSession session2 = openSession("repo2");
CDOView view2 = session2.openView();

Back to the top