1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
package org.postgresql.test.xa;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import junit.framework.TestSuite;
import org.postgresql.test.TestUtil;
public class XATestSuite extends TestSuite {
public static TestSuite suite() throws Exception {
Class.forName("org.postgresql.Driver");
TestSuite suite = new TestSuite();
Connection connection = TestUtil.openDB();
try
{
if (TestUtil.haveMinimumServerVersion(connection, "8.1"))
{
suite.addTestSuite(XADataSourceTest.class);
}
}
finally
{
connection.close();
}
return suite;
}
}
|