## GT0128 Hurricane WAP
## WSP Protocol Handler
#######################
## Ref. SGL.GT0128.aaa.bbb WSP Protocol Handler Unit Tests
## Unit test 2.1.4.2
## Driver chat script
#
# Test Synopsis
# * Connect while in Closing state
# The function ConnectReq will be called 

# Expected Result
# * Expected result: the original connection closes successfully, while the second request results in no action  


SCRIPT UnitTestDriver2.1.4.2 

#
# Sleep before start, allows stub time to start up and initialise.
#
	SLEEP 500

#
# Set the proxy info
#
INCLUDE "C:\HttpTest\wsp_pr_hnd_driver\setproxyinfo_driver.txt"

#
# connect
#
INCLUDE "C:\httptest\wsp_pr_hnd_driver\doconnect_accept_driver.txt"


#
# Client disconnect
#
	ECHO "Driver sending disconnect"
	SEND
		INVOKE SessionDisconnectL
		ENDINVOKE
	ENDSEND

#
# Do another connect. Since we are in the closing state there should be no action
#
	ECHO "Driver Sending Connect"
	SEND
		ALLOWREENTRANCY
		INVOKE SessionConnectL
		ENDINVOKE
	ENDSEND

#
# Expect the Already Conneting event
#
	EXPECT
		INVOCATION SessionRunL
			VALIDATE aEvent EAlreadyDisconnecting
		ENDINVOCATION
	ENDEXPECT

#
# Wait for ind - this is given by EDisconnected
#
	ECHO "Waiting for ind"
	EXPECT
		INVOCATION SessionRunL
			VALIDATE aEvent EDisconnected
		ENDINVOCATION
	ENDEXPECT



#
# Give the stub a chance to finish before exiting
#
	SLEEP 500
#
# Done!
#

ENDSCRIPT


