Skip to main content
summaryrefslogtreecommitdiffstats
blob: f3aa3b151ed17f11d08c977c11aaa8cc347e0069 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
 * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
 * 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
 *    Stefan Winkler - Bug 285426: [DB] Implement user-defined typeMapping support
 */
package org.eclipse.emf.cdo.tests.db;

import org.eclipse.emf.cdo.tests.AllConfigs;
import org.eclipse.emf.cdo.tests.AttributeTest;
import org.eclipse.emf.cdo.tests.AuditSameSessionTest;
import org.eclipse.emf.cdo.tests.AuditTest;
import org.eclipse.emf.cdo.tests.BranchingSameSessionTest;
import org.eclipse.emf.cdo.tests.BranchingTest;
import org.eclipse.emf.cdo.tests.ExternalReferenceTest;
import org.eclipse.emf.cdo.tests.FeatureMapTest;
import org.eclipse.emf.cdo.tests.MEMStoreQueryTest;
import org.eclipse.emf.cdo.tests.MergingTest;
import org.eclipse.emf.cdo.tests.XATransactionTest;
import org.eclipse.emf.cdo.tests.XRefTest;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_252214_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_303807_Test;
import org.eclipse.emf.cdo.tests.config.impl.ConfigTest;

import java.util.List;

/**
 * @author Eike Stepper
 */
public abstract class DBConfigs extends AllConfigs
{
  @Override
  protected void initTestClasses(List<Class<? extends ConfigTest>> testClasses)
  {
    testClasses.add(Net4jDBTest.class);
    testClasses.add(DBAnnotationsTest.class);
    testClasses.add(DBStoreTest.class);
    testClasses.add(CustomTypeMappingTest.class);
    testClasses.add(SQLQueryTest.class);

    super.initTestClasses(testClasses);
    testClasses.remove(MEMStoreQueryTest.class);

    if (!hasBranchingSupport())
    {
      testClasses.remove(BranchingTest.class);
      testClasses.remove(BranchingSameSessionTest.class);
      testClasses.remove(MergingTest.class);
      testClasses.remove(Bugzilla_303807_Test.class);
    }

    if (!hasAuditSupport())
    {
      // non-audit mode - remove audit tests
      testClasses.remove(AuditTest.class);
      testClasses.remove(AuditSameSessionTest.class);
      testClasses.remove(Bugzilla_252214_Test.class);
    }

    // fails because of Bug 284109
    testClasses.remove(XATransactionTest.class);
    testClasses.add(DISABLE_XATransactionTest.class);

    // XXX Range-based audit mapping does not support queryXRefs for now
    testClasses.remove(XRefTest.class);
    testClasses.add(DISABLE_XRefTest.class);

    // ------------ tests below only fail for PostgreSQL
    // ------------ therefore they are overridden and
    // ------------ skipConfig for PSQL is used temporarily
    // XXX [PSQL] disabled because of Bug 289445
    testClasses.remove(AttributeTest.class);
    testClasses.add(DISABLE_AttributeTest.class);

    testClasses.remove(FeatureMapTest.class);
    testClasses.add(DISABLE_FeatureMapTest.class);

    // XXX [PSQL] disabled because of Bug 290095
    // using skipconfig in DBAnnotationTest

    // XXX [PSQL] disabled because of Bug 290097
    testClasses.remove(ExternalReferenceTest.class);
    testClasses.add(DISABLE_ExternalReferenceTest.class);
  }

  protected abstract boolean hasBranchingSupport();

  protected abstract boolean hasAuditSupport();
}

Back to the top