changes for windows jdbc driverw
[csql.git] / test / jdbc / Gateway / GwTest8.java
blobae8d4755d2614b4ff66ee7ba08d075251b7cdc1b
1 //Donot Start CSQL Server
2 //Test 2000 connections in jdbc:gateway
4 import java.sql.*;
5 /**
7 * @author bijaya
8 */
9 public class GwTest8 {
10 public static void main(String[] args)
12 try
14 Class.forName("csql.jdbc.JdbcSqlDriver");
15 Connection con = DriverManager.getConnection("jdbc:gateway", "root", "manager");
16 con.close();
17 int i;
18 for ( i=1; i <2000 ; i++)
20 con = DriverManager.getConnection("jdbc:gateway", "root", "manager");
21 if(con==null) break;
22 con.close();
24 if (i !=2000)
26 System.out.println("Test Case Failed");
27 System.exit(1);
28 }else {
29 System.out.println("Test Case Passed");
30 System.exit(0);
32 }catch(Exception e) {
33 System.out.println("Exception in Test: "+e);
34 e.printStackTrace();
35 System.exit(1);