summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-24 15:52:33 (EDT)
committerEike Stepper2006-08-24 15:52:33 (EDT)
commit749281269cf75553272204fb4cbfe4be9082fa3c (patch)
tree3d0328d17e98ff3f92b8e59a56ed5c0758a44e17
parentec28140a0612cd90ebd72a0016dcd9b7698573bd (diff)
downloadcdo-749281269cf75553272204fb4cbfe4be9082fa3c.zip
cdo-749281269cf75553272204fb4cbfe4be9082fa3c.tar.gz
cdo-749281269cf75553272204fb4cbfe4be9082fa3c.tar.bz2
[151560] Query Language for CDO
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/internal/CDOTestPlugin.java (renamed from plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java)2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1EmbeddedTests.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java (renamed from plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1Tests.java)2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/NotificationTest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java31
13 files changed, 60 insertions, 101 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
index d61aa1a..e776935 100644
--- a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.tests; singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.emf.cdo.tests.CDOTestPlugin
+Bundle-Activator: org.eclipse.emf.cdo.tests.internal.CDOTestPlugin
Bundle-ClassPath: cdo.tests.jar
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
index 3fa460c..16851f1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
@@ -61,8 +61,7 @@ public class AllSuites extends TestSuite
protected Test[] createPackageSuites()
{
return new Test[] { //
- org.eclipse.emf.cdo.tests.AllTests.suite(), //
- org.eclipse.emf.cdo.tests.model1.AllTests.suite() //
+ org.eclipse.emf.cdo.tests.model1.AllTests.suite() //
};
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
deleted file mode 100644
index 1d26fc8..0000000
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004, 2005, 2006 Eike Stepper, Fuggerstr. 39, 10777 Berlin, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.emf.cdo.tests;
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.emf.cdo.tests");
- suite.addTestSuite(SampleTest.class);
- return suite;
- }
-
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java
deleted file mode 100644
index dc691c8..0000000
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004, 2005, 2006 Eike Stepper, Fuggerstr. 39, 10777 Berlin, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.emf.cdo.tests;
-
-import junit.framework.TestCase;
-
-public class SampleTest extends TestCase
-{
- public static void testSample() throws Exception {
- assertTrue(true); // TODO: add real JUnit tests here
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/internal/CDOTestPlugin.java
index 2cc51f1..06ce08f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/internal/CDOTestPlugin.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.emf.cdo.tests;
+package org.eclipse.emf.cdo.tests.internal;
import org.eclipse.net4j.util.eclipse.AbstractPlugin;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1EmbeddedTests.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1EmbeddedTests.java
deleted file mode 100644
index ea60db6..0000000
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1EmbeddedTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004, 2005, 2006 Eike Stepper, Fuggerstr. 39, 10777 Berlin, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.emf.cdo.tests.model1;
-
-
-import org.eclipse.emf.cdo.tests.topology.ITopologyConstants;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-public class AllModel1EmbeddedTests implements ITopologyConstants
-{
- public static Test suite()
- {
- System.setProperty(CDO_TEST_MODE_KEY, EMBEDDED_MODE);
- TestSuite suite = new TestSuite("Embedded Test for org.eclipse.emf.cdo.tests.model1");
- suite.addTestSuite(BasicTest.class);
- suite.addTestSuite(AdapterTest.class);
- suite.addTestSuite(SerializationTest.class);
- suite.addTestSuite(NotificationTest.class);
- suite.addTestSuite(ExtentTest.class);
- suite.addTestSuite(OCLTest.class);
- suite.addTestSuite(Bugzilla154389Test.class);
- return suite;
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1Tests.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java
index ce132bf..1489e3f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllModel1Tests.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AllTests.java
@@ -15,7 +15,7 @@ import junit.framework.Test;
import junit.framework.TestSuite;
-public class AllModel1Tests
+public class AllTests
{
public static Test suite()
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/NotificationTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/NotificationTest.java
index 3497f20..ea9858c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/NotificationTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/NotificationTest.java
@@ -26,7 +26,7 @@ public class NotificationTest extends AbstractModel1Test
final String RESOURCE = "/test/res";
final String ROOT = "root";
final String NEW_ROOT = "new root";
- final long TIME_LIMIT = 100;
+ final long TIME_LIMIT = 1000;
// Client1 creates resource
TreeNode root = createNode(ROOT);
@@ -60,7 +60,7 @@ public class NotificationTest extends AbstractModel1Test
final String ROOT = "root";
final String CHILD = "a";
final String NEW_NAME = "a2";
- final long TIME_LIMIT = 100;
+ final long TIME_LIMIT = 1000;
// Client1 creates resource
TreeNode root = createNode(ROOT);
@@ -96,7 +96,7 @@ public class NotificationTest extends AbstractModel1Test
final String ROOT = "root";
final String CHILD = "a";
final String NEW_NAME = "a2";
- final long TIME_LIMIT = 100;
+ final long TIME_LIMIT = 1000;
// Client1 creates resource
TreeNode root = createNode(ROOT);
@@ -133,7 +133,7 @@ public class NotificationTest extends AbstractModel1Test
final String ROOT = "root";
final String CHILD = "a";
final String NEW_NAME = "a2";
- final long TIME_LIMIT = 100;
+ final long TIME_LIMIT = 1000;
final boolean[] notificationReceived = { false};
// Client1 creates resource
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java
index 034cbac..3c484f2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopology.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.tests.topology;
import org.eclipse.emf.cdo.client.ResourceManager;
-import org.eclipse.emf.cdo.tests.CDOTestPlugin;
+import org.eclipse.emf.cdo.tests.internal.CDOTestPlugin;
import org.eclipse.emf.ecore.resource.ResourceSet;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
index 42e8b2e..d7f2ff9 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
@@ -36,13 +36,12 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
@Override
protected void setUp() throws Exception
{
+ topology = createTopology();
System.out.println("=========================================================================");
- System.out.println("TC_START " + getName());
+ System.out.println("TC_START " + getName() + " [" + topology.getName() + "]");
System.out.println("=========================================================================");
super.setUp();
- topology = createTopology();
- System.out.println("Topology: " + topology.getName());
topology.start();
}
@@ -56,7 +55,7 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
super.tearDown();
System.out.println("=========================================================================");
- System.out.println("TC_END " + getName());
+ System.out.println("TC_END " + getName() + " [" + topology.getName() + "]");
System.out.println("=========================================================================");
System.out.println();
System.out.println();
@@ -170,7 +169,7 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
protected String getMode()
{
- return System.getProperty(CDO_TEST_MODE_KEY, EMBEDDED_MODE);
+ return System.getProperty(CDO_TEST_MODE_KEY, DEFAULT_MODE);
}
protected void assertTrue(Object object)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java
index 4648b97..25a087d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ClientTopology.java
@@ -15,7 +15,9 @@ import org.eclipse.net4j.spring.Container;
import javax.sql.DataSource;
-
+/*
+ * TODO Test this topology (need external server for that)
+ */
public class ClientTopology extends AbstractTopology
{
private Container net4j;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java
index b5e8174..c086f2b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java
@@ -24,9 +24,17 @@ public interface ITopologyConstants
public static final String EMBEDDED_MODE = "Embedded";
public static final String[] ALL_MODES = { //
- CLIENT_SEPARATED_SERVER_MODE, // 0
- CLIENT_SERVER_MODE, // 1
- CLIENT_MODE, // 2
- EMBEDDED_MODE // 3
- };
+ CLIENT_SEPARATED_SERVER_MODE, // 0
+ CLIENT_SERVER_MODE, // 1
+ CLIENT_MODE, // 2
+ EMBEDDED_MODE // 3
+ };
+
+ public static final String[] ALL_SELF_CONTAINED_MODES = { //
+ CLIENT_SEPARATED_SERVER_MODE, // 0
+ CLIENT_SERVER_MODE, // 1
+ EMBEDDED_MODE // 2
+ };
+
+ public static final String DEFAULT_MODE = EMBEDDED_MODE;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java
new file mode 100644
index 0000000..17ca272
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java
@@ -0,0 +1,31 @@
+package org.eclipse.emf.cdo.tests.topology;
+
+
+import junit.framework.Assert;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+
+public class TopologySuite extends TestSuite implements ITopologyConstants
+{
+ private String mode = DEFAULT_MODE;
+
+ public TopologySuite(String mode)
+ {
+ super("Mode " + mode);
+ this.mode = mode;
+ }
+
+ public String getMode()
+ {
+ return mode;
+ }
+
+ @Override
+ public void run(TestResult result)
+ {
+ Assert.assertNotNull(mode);
+ System.setProperty(CDO_TEST_MODE_KEY, mode);
+ super.run(result);
+ }
+}