adding test scripts
[csql.git] / test / jdbc / network / Gateway / GwTest1.java
blobdda9b9f2dad437a674d5685ff877ff9e1e9108a2
1 // Connect with connectstring "jdbc:gateway://localhost:5678" and give correct "user" and "password" in properties object.
2 //It should pass.when csqlserver is not runnig
3 import java.sql.*;
5 /**
7 * @author Nihar
8 */
9 public class GwTest1 {
10 public static void main(String[] args)
12 try
14 Class.forName("csql.jdbc.JdbcSqlDriver");
15 Connection con = DriverManager.getConnection("jdbc:gateway://localhost:5678", "root", "manager");
16 if ( con == null )
18 System.out.println("Test Case Fail");
19 System.exit(1);
21 System.out.println("Test Case Passed");
22 con.close();
23 System.exit(0);
24 }catch(Exception e) {
25 System.out.println("Exception in Test: "+e);
26 e.getStackTrace();
27 System.exit(1);