[jboss-cvs] JBossAS SVN: r110373 - in projects/jboss-jca/trunk/common/src/test: resources/ds/unit and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 14 10:43:45 EST 2011
Author: maeste
Date: 2011-01-14 10:43:44 -0500 (Fri, 14 Jan 2011)
New Revision: 110373
Added:
projects/jboss-jca/trunk/common/src/test/resources/ds/unit/jeremy-ds.xml
Modified:
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java
Log:
adding tests with jeremy's case. Test is passing
Modified: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java 2011-01-14 15:08:17 UTC (rev 110372)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/ds/DsParserForValidatorExceptionTestCase.java 2011-01-14 15:43:44 UTC (rev 110373)
@@ -400,4 +400,23 @@
//then throw ValidateException
}
+ /**
+ *
+ * shouldThrowValidateExceptionIfValidationCheckerClassNameMissing
+ *
+ * @throws Exception test passes if a {@link ValidateException} has been
+ * thrown
+ */
+ @Test()
+ public void shouldNotThrowValidateExceptionWithJeremysFile() throws Exception
+ {
+
+ //given
+ File xmlFile = new File(Thread.currentThread().getContextClassLoader().getResource("ds/unit/jeremy-ds.xml")
+ .toURI());
+ //when
+ doParse(xmlFile);
+ //then don't throw ValidateException
+ }
+
}
Added: projects/jboss-jca/trunk/common/src/test/resources/ds/unit/jeremy-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/ds/unit/jeremy-ds.xml (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/ds/unit/jeremy-ds.xml 2011-01-14 15:43:44 UTC (rev 110373)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
+ <datasource jndi-name="SampleDS" pool-name="SampleDS">
+ <connection-url>jdbc:hsqldb:mem:test</connection-url>
+ <!-- The driver class -->
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <pool>
+ <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+ <min-pool-size>5</min-pool-size>
+ <!-- The maximum connections in a pool/sub-pool -->
+ <max-pool-size>300</max-pool-size>
+ <!-- The login and password -->
+ </pool>
+ <security>
+ <user-name>sa</user-name>
+ <password></password>
+ </security>
+ <validation>
+ <!--valid-connection-checker-class-name>org.jboss.jca.adapters.jdbc.ValidConnectionChecker</valid-connection-checker-class-name-->
+ </validation>
+ <time-out>
+ <!-- The time before an unused connection is destroyed -->
+ <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+ <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+ </time-out>
+
+ <statement>
+ <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature
+ that should be turned off in production
+ Turned off for performance optimisation.-->
+ <track-statements>false</track-statements>
+ <!-- HSQL DB benefits from prepared statement caching -->
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+ </statement>
+
+
+ </datasource>
+</datasources>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list