adding test scripts
[csql.git] / test / jdbc / Gateway / GwTest6.java
bloba580375e98bf0c652404905b24d1359eec96fb06
1 //Donot Start CSQL Server
2 //Open through "jdbc:gateway", close and then again open through "jdbc:gateway". It should pass.
3 import java.sql.*;
4 /**
6 * @author bijaya
7 */
8 public class GwTest6 {
9 public static void main(String[] args)
11 try
13 Class.forName("csql.jdbc.JdbcSqlDriver");
14 Connection con = DriverManager.getConnection("jdbc:gateway", "root", "manager");
15 if ( con == null )
16 System.exit(1);
17 System.out.println("Connection 1 done");
18 con.close();
19 con = DriverManager.getConnection("jdbc:gateway","root","manager");
20 if ( con == null )
21 System.exit(1);
22 System.out.println("connection second time done");
23 con.close();
24 System.exit(0);
25 }catch(Exception e) {
26 System.out.println(e.getMessage());
27 e.getStackTrace();
28 System.exit(1);