~ubuntu-branches/ubuntu/maverick/libpgjava/maverick

« back to all changes in this revision

Viewing changes to org/postgresql/test/xa/XATestSuite.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-25 00:07:07 UTC
  • mfrom: (1.3.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060425000707-6lr2s0awuz4z48hm
* Drop support for the old jdbc2 driver (can be reverted if wanted)
  (closes: #358345).
* New upstream (thanks to Wolfgang Baer).

Show diffs side-by-side

added added

removed removed

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