diff options
author | Eike Stepper | 2011-08-26 10:11:01 +0000 |
---|---|---|
committer | Eike Stepper | 2011-08-26 10:11:01 +0000 |
commit | d850e8067564a7c5d5d217c9afa58ca61134efa9 (patch) | |
tree | 9fd5cc976237b1398b05648a54c0135281456ab4 /plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java | |
parent | 0d0f0c489b9f244987cafc8dfae1437785fc2e16 (diff) | |
download | cdo-d850e8067564a7c5d5d217c9afa58ca61134efa9.tar.gz cdo-d850e8067564a7c5d5d217c9afa58ca61134efa9.tar.xz cdo-d850e8067564a7c5d5d217c9afa58ca61134efa9.zip |
[355921] [Tests] Constrain tests declaratively
https://bugs.eclipse.org/bugs/show_bug.cgi?id=355921
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java index 907ea8bf89..3cbcbea4ea 100644 --- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java +++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfig.java @@ -27,12 +27,17 @@ import javax.sql.DataSource; import java.util.HashMap; import java.util.Map; +import java.util.Set; /** * @author Eike Stepper */ public abstract class DBConfig extends RepositoryConfig { + public static final String CAPABILITY_RANGES = "DB.ranges"; + + public static final String CAPABILITY_COPY_ON_BRANCH = "DB.copy.on.branch"; + private static final long serialVersionUID = 1L; private boolean withRanges; @@ -47,6 +52,31 @@ public abstract class DBConfig extends RepositoryConfig this.copyOnBranch = copyOnBranch; } + @Override + public void initCapabilities(Set<String> capabilities) + { + super.initCapabilities(capabilities); + capabilities.add(getDBAdapterName()); + + if (isWithRanges()) + { + capabilities.add(CAPABILITY_RANGES); + } + + if (isCopyOnBranch()) + { + capabilities.add(CAPABILITY_COPY_ON_BRANCH); + } + } + + protected abstract String getDBAdapterName(); + + @Override + protected String getStoreName() + { + return "DB"; + } + public boolean isWithRanges() { return withRanges; |