Index: topia/src/test/org/codelutin/topia/persistence/PersistenceStorageJDBCMckoiInMemoryTest.java diff -u /dev/null topia/src/test/org/codelutin/topia/persistence/PersistenceStorageJDBCMckoiInMemoryTest.java:1.1 --- /dev/null Tue Aug 2 15:00:48 2005 +++ topia/src/test/org/codelutin/topia/persistence/PersistenceStorageJDBCMckoiInMemoryTest.java Tue Aug 2 15:00:43 2005 @@ -0,0 +1,77 @@ +/* *##% + * Copyright (C) 2005 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * PersistenceStorageJDBCMckoiInMemoryTest.java + * + * Created: 28 juillet 2005 23:41:11 CEST + * + * @author Benjamin POUSSIN + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2005/08/02 15:00:43 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia.persistence; + +import java.io.File; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.Properties; +import junit.framework.TestCase; +import org.codelutin.topia.TopiaConst; + +public class PersistenceStorageJDBCMckoiInMemoryTest extends AbstractPersistenceStorageTestCase { // PersistenceStorageJDBCMckoiInMemoryTest + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Logger log = Logger.getLogger("org.codelutin.topia.persistence.PersistenceStorageJDBCMckoiInMemoryTest"); + + public Properties getConfig() throws Exception { + System.out.println("----------------- Mckoi in Mem ----------------------"); + Properties config = new Properties(); + + File dir = new File("/tmp/topia-mckoi-inmem"); + dir.mkdirs(); + + File file = new File(dir, "db.conf"); + file.createNewFile(); + + config.setProperty(TopiaConst.PERSISTENCE_STORAGE_JDBC_DRIVER, "com.mckoi.JDBCDriver"); + config.setProperty(TopiaConst.PERSISTENCE_STORAGE_JDBC_URL, + "jdbc:mckoi:local:///tmp/topia-mckoi/db.conf" + + "?create_or_boot=true" + + "&storage_system=v1javaheap" + + "&use_nio_if_available=enabled" + + ""); + + config.setProperty(TopiaConst.PERSISTENCE_STORAGE_JDBC_LOGIN, "dbuser"); + config.setProperty(TopiaConst.PERSISTENCE_STORAGE_JDBC_PASSWORD, "xxxxxxxx"); + + return config; + } + + public void testPerf() throws Exception { + int n = (MAX < 5000?MAX:MAX); + super.testPerf(n); + } + + +} // PersistenceStorageJDBCMckoiInMemoryTest +