[Jiemamy-notify:1998] commit [3145] リアルDBテスト整備。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 7日 (火) 03:04:28 JST


Revision: 3145
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3145
Author:   daisuke_m
Date:     2009-04-07 03:04:27 +0900 (Tue, 07 Apr 2009)

Log Message:
-----------
リアルDBテスト整備。

Modified Paths:
--------------
    artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java
    artemis/trunk/jiemamy-artemis-test/src/test/resources/database_hudson.properties


-------------- next part --------------
Modified: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java
===================================================================
--- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java	2009-04-06 17:18:02 UTC (rev 3144)
+++ artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/TestDatabaseInstanceTest.java	2009-04-06 18:04:27 UTC (rev 3145)
@@ -30,6 +30,8 @@
 import java.util.Properties;
 
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.jiemamy.utils.DatabaseConnectionConfig;
 import org.jiemamy.utils.DriverUtil;
@@ -42,6 +44,9 @@
  */
 public class TestDatabaseInstanceTest {
 	
+	private static Logger logger = LoggerFactory.getLogger(TestDatabaseInstanceTest.class);
+	
+
 	/**
 	 * 全てのテストDBに接続できること。
 	 * 
@@ -50,6 +55,7 @@
 	@Test
 	public void test01_全てのテストDBに接続できること() throws Exception {
 		for (TestDatabaseInstance db : TestDatabaseInstance.values()) {
+			logger.info(db.name());
 			DatabaseConnectionConfig config = db.getConfig();
 			Properties props = new Properties();
 			props.setProperty("user", config.getUsername());
@@ -58,6 +64,7 @@
 			URL[] paths = config.getDriverJarPaths();
 			if (existsAll(paths) == false) {
 				// driver jarファイルが見つからない場合、テストをスキップする
+				logger.info("skip");
 				continue;
 			}
 			String className = config.getDriverClassName();
@@ -67,6 +74,10 @@
 				Driver driver = DriverUtil.getDriverInstance(paths, className);
 				connection = driver.connect(config.getUri(), props);
 				assertThat(connection, is(notNullValue()));
+				logger.info("success");
+			} catch (Exception e) {
+				logger.info("failed");
+				throw e;
 			} finally {
 				JmIOUtil.closeQuietly(connection);
 			}

Modified: artemis/trunk/jiemamy-artemis-test/src/test/resources/database_hudson.properties
===================================================================
--- artemis/trunk/jiemamy-artemis-test/src/test/resources/database_hudson.properties	2009-04-06 17:18:02 UTC (rev 3144)
+++ artemis/trunk/jiemamy-artemis-test/src/test/resources/database_hudson.properties	2009-04-06 18:04:27 UTC (rev 3145)
@@ -4,7 +4,7 @@
 PostgreSQL_user = jiemamy01
 PostgreSQL_password = dummy
 
-MySQL_driverJar = TODO
+MySQL_driverJar = /usr/local/jdbc/mysql-connector-java-5.0.4.jar
 MySQL_driverClass = com.mysql.jdbc.Driver
 MySQL_uri = jdbc:mysql://griffon.jiemamy.org/jiemamy01
 MySQL_user = jiemamy01



Jiemamy-notify メーリングリストの案内
Back to archive index