adding test scripts
[csql.git] / test / jdbc / network / Gateway / test047.ksh
blobebd9fa1e0fc6d3d8aa0f8280982bfc5cbbd822ff
1 #!/bin/ksh
2 # Donot Start CSQL Server
3 # Open the connection through jdbc:gateway and then call isClosed(). It should return false.
4 # Close the connection jdbc:gateway and then call isClosed(). It should return true
6 # GwTest7.java
8 TESTFILE=${PWD}/jdbc/network/Gateway/GwTest1.java
9 REL_PATH=.
10 if [ -s "$TESTFILE" ]
11 then
12 REL_PATH=`pwd`/jdbc/network/Gateway
14 export CLASSPATH=$CLASSPATH:${REL_PATH}
15 rm -f /tmp/csql.conf
16 cp $CSQL_CONFIG_FILE /tmp/csql.conf
17 export CSQL_CONFIG_FILE=/tmp/csql.conf
18 #export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
19 echo "CACHE_TABLE=true" >>$CSQL_CONFIG_FILE
20 echo DSN=$DSN >>$CSQL_CONFIG_FILE
21 DS="$DSN $DBUSER $PASSWORD"
22 rm -f /tmp/csql/csqlds.conf
23 touch /tmp/csql/csqlds.conf
24 $CSQL_INSTALL_ROOT/bin/csqlds -U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
25 if [ $? -ne 0 ]
26 then
27 exit 1;
30 java GwTest7
31 if [ $? -ne 0 ]
32 then
33 exit 1;
37 exit 0;