Project

General

Profile

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

    
11
package eu.etaxonomy.cdm.test.function;
12

    
13
import org.apache.log4j.Logger;
14
import org.junit.Before;
15
import org.junit.Ignore;
16
import org.junit.Test;
17

    
18
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
19
import eu.etaxonomy.cdm.database.CdmDataSource;
20
import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
21
import eu.etaxonomy.cdm.database.DbSchemaValidation;
22
import eu.etaxonomy.cdm.model.common.init.TermNotFoundException;
23
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
24

    
25
/**
26
 * <h2>NOTE</h2>
27
 * This is a test for sole development purposes, it is not
28
 * touched my mvn test since it is not matching the "\/**\/*Test" pattern,
29
 * but it should be annotate with @Ignore when running the project a s junit suite in eclipse
30
 *
31
 *
32
 * @author n.hoffmann
33
 * @created Sep 25, 2009
34
 * @version 1.0
35
 */
36
@Ignore /* IGNORE in Suite */
37
public class TestC3P0Configuration{
38
	private static final Logger logger = Logger.getLogger(TestC3P0Configuration.class);
39

    
40
	CdmApplicationController appController;
41

    
42
	@Before
43
	public void setup() throws DataSourceNotFoundException, TermNotFoundException{
44
		CdmDataSource dataSource = CdmDataSource.NewMySqlInstance("localhost", "test", -1, "edit", "wp5", NomenclaturalCode.ICNAFP);
45
		appController = CdmApplicationController.NewInstance(dataSource, DbSchemaValidation.CREATE);
46
	}
47

    
48
	@Test
49
	public void testLongSession() throws InterruptedException{
50
		appController.NewConversation();
51

    
52
		appController.getTaxonService().list(null, null, null, null,null);
53

    
54
		Thread.sleep(70 * 1000);
55

    
56
		appController.getTaxonService().list(null, null, null, null,null);
57
	}
58
}
(4-4/11)