Project

General

Profile

Download (2.94 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.test.suite;
11

    
12
import org.junit.runner.RunWith;
13
import org.junit.runners.Suite;
14

    
15
import eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBaseTest;
16
import eu.etaxonomy.cdm.persistence.dao.hibernate.description.DescriptionDaoHibernateImplTest;
17
import eu.etaxonomy.cdm.persistence.dao.hibernate.taxon.TaxonDaoHibernateImplTest;
18

    
19

    
20
@RunWith(Suite.class)
21
@Suite.SuiteClasses(
22
        {
23
            //MethodCacheImplTest.class,
24
            //GroupDaoHibernateImplTest.class,
25
            //OccurrenceDaoHibernateImplTest.class,
26
            CdmEntityDaoBaseTest.class,
27
            /*
28
             * FIXME:
29
             * DescriptionDaoHibernateImplTest.class Fails with "java.sql.BatchUpdateException: failed batch" on rollback after test,
30
             * this can be circumvented by manually editing org/unitils/dbunit/DbUnitModule.java in order to disable batched statements:
31
             * LINE 461: config.setProperty(FEATURE_BATCHED_STATEMENTS, "false");
32
             *
33
             * This reveals other errors during org.unitils.database.DatabaseModule.rollbackTransaction()
34
             * of test method testSaveClonedDescription():
35
             *
36
             *  - in hsqldb:
37
             *      Caused by: java.sql.SQLException: Violation of unique constraint SYS_PK_1209:
38
             *      duplicate value(s) for column(s) ID in statement
39
             *      [insert into TaxonBase (created, createdby_id, uuid, updated, updatedby_id, lsid_authority, lsid_lsid, lsid_namespace, lsid_object, lsid_revision, protectedtitlecache, titleCache, appendedphrase, doubtful, name_id, sec_id, usenamecache, excluded, taxonstatusunknown, unplaced, DTYPE, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'Taxon', ?)]
40
             *		at org.hsqldb.jdbc.Util.throwError(Util.java:58)
41
             *
42
             *  - in h2:
43
             * 		Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
44
             *      PRIMARY_KEY_C0 ON PUBLIC.TAXONBASE(ID); SQL statement:
45
             * 		insert into TaxonBase (created, createdby_id, uuid, updated, updatedby_id, lsid_authority, lsid_lsid, lsid_namespace, lsid_object, lsid_revision, protectedtitlecache, titleCache, appendedphrase, doubtful, name_id, sec_id, usenamecache, excluded, taxonstatusunknown, unplaced, DTYPE, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'Taxon', ?) [23001-115]
46
             *
47
             */
48
            DescriptionDaoHibernateImplTest.class,
49
            TaxonDaoHibernateImplTest.class
50

    
51
        }
52
    )
53
public class TestsShouldNotFailInSuite_3 {
54

    
55
    // the class remains completely empty,
56
    // being used only as a holder for the above annotations
57

    
58
}
(4-4/4)