adding test scripts
[csql.git] / test / jdbc / network / Gateway / ConnTest04.java
blob26e78d69200bc2b6cae531b39a6267a275b84c98
1 //Try to connect with connectstring "jdbc:gateway://localhost:5678" and give incorrect "user" and "password" in properties object. It should fail.
2 import java.sql.*;
3 public class ConnTest04
5 public static void main(String[] args)
7 try
9 Class.forName("csql.jdbc.JdbcSqlDriver");
10 Connection con = DriverManager.getConnection("jdbc:gateway://localhost:5678", "wrongusertest", "manager");
11 if (con != null) System.exit (1);
12 }catch(Exception e) {
13 System.out.println("Exception in Test: "+e.getMessage());
14 e.getStackTrace();
15 System.exit(0);