[#2566] Upgrade integration test jTDS version to 1.3.1
This commit is contained in:
parent
fc54860099
commit
a4eded5b46
@ -21,7 +21,7 @@
|
||||
<classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.15-bin.jar" sourcepath="/jOOQ-sources/mysql-connector-java-5.1.15.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.16.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jconn3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jtds-1.2.5.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jtds-1.3.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/iijdbc.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/h2-1.3.170.jar" sourcepath="/h2"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/JDBC-9.1.0.0212-cubrid.jar"/>
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.1.0.xsd">
|
||||
<jdbc>
|
||||
<driver>net.sourceforge.jtds.jdbc.Driver</driver>
|
||||
<url>jdbc:jtds:sqlserver://localhost:1433;databaseName=test;integratedSecurity=true</url>
|
||||
<schema>dbo</schema>
|
||||
<user></user>
|
||||
<password></password>
|
||||
</jdbc>
|
||||
</configuration>
|
||||
@ -23,7 +23,7 @@
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry path="3" projectName="jOOQ-meta" type="1"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" javaProject="jOOQ-meta" path="3" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/jOOQ-test/lib/log4j-1.2.16.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/jOOQ-test/lib/jtds-1.2.5.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/jOOQ-test/lib/jtds-1.3.1.jar" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/jOOQ-test/lib/jconn3.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry path="3" projectName="jOOQ-meta" type="1"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" javaProject="jOOQ-meta" path="3" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/jOOQ-test/lib/jtds-1.2.5.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/jOOQ-test/lib/jtds-1.3.1.jar" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
|
||||
20
jOOQ-test/launch/SQLServerTest (jTDS).launch
Normal file
20
jOOQ-test/launch/SQLServerTest (jTDS).launch
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/jOOQ-test/src/org/jooq/test/SQLServerTest.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
|
||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.test.SQLServerTest"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-test"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.jooq.configuration=/org/jooq/configuration/${env_var:USERNAME}/sqlserver/library-jtds.xml -Djava.library.path=C:\jtds-1.3.1-dist\x64\SSO"/>
|
||||
</launchConfiguration>
|
||||
Binary file not shown.
BIN
jOOQ-test/lib/jtds-1.3.1.jar
Normal file
BIN
jOOQ-test/lib/jtds-1.3.1.jar
Normal file
Binary file not shown.
Binary file not shown.
@ -53,6 +53,7 @@ import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Date;
|
||||
import java.sql.Driver;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLSyntaxErrorException;
|
||||
@ -362,6 +363,10 @@ public abstract class jOOQAbstractTest<
|
||||
}
|
||||
}
|
||||
|
||||
else if (e.getMessage().startsWith("Cannot drop")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// There is no DROP SEQUENCE IF EXISTS statement in Sybase
|
||||
else if (e.getClass().getName().startsWith("com.sybase")) {
|
||||
if (sql.contains("DROP SEQUENCE")) {
|
||||
@ -654,19 +659,22 @@ public abstract class jOOQAbstractTest<
|
||||
jdbc.getPassword() != null ? jdbc.getPassword() :
|
||||
getProperty(jdbc.getProperties(), "password");
|
||||
|
||||
Class.forName(driver);
|
||||
if (StringUtils.isBlank(jdbcUser)) {
|
||||
Properties p = new Properties();
|
||||
|
||||
if (getClass().getSimpleName().toLowerCase().contains("ingres")) {
|
||||
p.setProperty("timezone", "EUROPE-CENTRAL");
|
||||
}
|
||||
|
||||
return DriverManager.getConnection(getJdbcURL(), p);
|
||||
Properties info = new Properties();
|
||||
if (getClass().getSimpleName().toLowerCase().contains("ingres")) {
|
||||
info.setProperty("timezone", "EUROPE-CENTRAL");
|
||||
}
|
||||
Driver d = ((Driver) Class.forName(driver).newInstance());
|
||||
if (!StringUtils.isBlank(jdbcUser)) {
|
||||
info.put("user", jdbcUser);
|
||||
info.put("password", jdbcPassword);
|
||||
}
|
||||
else {
|
||||
return DriverManager.getConnection(getJdbcURL(), jdbcUser, jdbcPassword);
|
||||
}
|
||||
|
||||
return d != null
|
||||
? d.connect(getJdbcURL(), info)
|
||||
: DriverManager.getConnection(getJdbcURL(), info);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new Error(e);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user