adding test scripts
[csql.git] / test / jdbc / network / Connection / ConnTest20.java
blob5e214cd94369d8441b3d47faa2953e1b51dc5936
1 //Open the connection and then call isClosed(). It should return false.
2 //Close the connection and then call isClosed(). It should return true.
3 import java.sql.*;
4 public class ConnTest20
6 public static void main(String[] args)
8 try
10 Class.forName("csql.jdbc.JdbcSqlDriver");
11 Connection con = DriverManager.getConnection("jdbc:csql://localhost:5678", "root", "manager");
12 if ( con == null )
13 System.exit(1);
14 if(con.isClosed()) System.exit(1);
15 con.close();
16 if(!con.isClosed()) System.exit(1);
17 }catch(Exception e) {
18 System.out.println(e.getMessage());
19 e.getStackTrace();
20 System.exit(1);