diff --git a/basice2e/clients.goldoutput/client204.txt b/basice2e/clients.goldoutput/client204.txt new file mode 100644 index 0000000000000000000000000000000000000000..832c11da1630aacc2aa81275562d5695160e6a53 --- /dev/null +++ b/basice2e/clients.goldoutput/client204.txt @@ -0,0 +1,3 @@ +Established connection server, begin listening... +Established connection with client +ConnectionServer heard message "Hello 200 from 201, using connections" diff --git a/basice2e/clients.goldoutput/client205.txt b/basice2e/clients.goldoutput/client205.txt new file mode 100644 index 0000000000000000000000000000000000000000..79da732c81ee4e5c421ba2a539420a337da51d31 --- /dev/null +++ b/basice2e/clients.goldoutput/client205.txt @@ -0,0 +1,8 @@ +Loading ephemerally +Sending connection request +Established connection with server +Sent message "Hello 200 from 201, using connections" to connection partner. +Loading ephemerally +Sending connection request +Established connection with server +Disconnected from partner diff --git a/basice2e/clients.goldoutput/client206.txt b/basice2e/clients.goldoutput/client206.txt new file mode 100644 index 0000000000000000000000000000000000000000..6b73f59e8cebed3a305b2bb8ba8bd2fa7fa84c39 --- /dev/null +++ b/basice2e/clients.goldoutput/client206.txt @@ -0,0 +1,5 @@ +Established connection server, begin listening... +Established authenticated connection with client +AuthServer heard message "Hello 202 from 203, using connections" +Established authenticated connection with client + diff --git a/basice2e/clients.goldoutput/client207.txt b/basice2e/clients.goldoutput/client207.txt new file mode 100644 index 0000000000000000000000000000000000000000..6608551fb458585fba1d72ed801f5a3cc3dadb59 --- /dev/null +++ b/basice2e/clients.goldoutput/client207.txt @@ -0,0 +1,8 @@ +Loading ephemerally +Sending connection request +Established authenticated connection with server. +Sent message "Hello 202 from 203, using connections" to connection partner. +Loading ephemerally +Sending connection request +Established authenticated connection with server. +Disconnected from partner diff --git a/basice2e/run.sh b/basice2e/run.sh index fbbd6fa960500d20b206e65b49d11daf188e8108..a49580957576da053f4ca311371547210684966e 100755 --- a/basice2e/run.sh +++ b/basice2e/run.sh @@ -1103,14 +1103,11 @@ wait $PIDVAL1 echo "BROADCAST CHANNELS FINISHED..." - - ############################################################################### -# Test connections +# Test ephemeral connections ############################################################################### -echo "TESTING CONNECTIONS..." -echo "Testing Ephemeral Initialization..." +echo "TESTING EPEHMERAL CONNECTIONS..." # Initiate server CLIENTCMD="timeout 240s ../bin/client connection --ephemeral -s blob200 $CONNECTIONOPTS --writeContact $CLIENTOUT/client200-server.bin -l $CLIENTOUT/client200.log --startServer --serverTimeout 2m" eval $CLIENTCMD > $CLIENTOUT/client200.txt 2>&1 || true & @@ -1132,42 +1129,13 @@ PIDVAL2=$! echo "$CLIENTCMD -- $PIDVAL2" wait $PIDVAL2 wait $PIDVAL1 -echo "Ephemeral Test Complete." - - -# TODO: TEST NON-EPHEMERAL CODE-PATH WHEN SUPPORTED -#echo "Testing Non-Ephemeral Initialization..." -## Initiate server -#CLIENTCMD="timeout 240s ../bin/client connection -s blob200 $CONNECTIONOPTS --writeContact $CLIENTOUT/client200-server.bin -l $CLIENTOUT/client200.log --startServer --serverTimeout 2m" -#eval $CLIENTCMD > $CLIENTOUT/client200.txt 2>&1 || true & -#PIDVAL1=$! -#echo "$CLIENTCMD -- $PIDVAL1" -#echo "Sleeping to ensure connection server instantiation" -#sleep 5 -## Initiate client and send message to server -#CLIENTCMD="timeout 240s ../bin/client connection -s blob201 --connect $CLIENTOUT/client200-server.bin $CONNECTIONOPTS -l $CLIENTOUT/client201.log -m \"Hello 200 from 201, using connections\" --receiveCount 0" -#eval $CLIENTCMD > $CLIENTOUT/client201.txt 2>&1 || true & -#PIDVAL2=$! -#echo "$CLIENTCMD -- $PIDVAL2" -#wait $PIDVAL2 -# -## Disconnect -#CLIENTCMD="timeout 240s ../bin/client connection -s blob201 $CONNECTIONOPTS -l $CLIENTOUT/client201.log --connect $CLIENTOUT/client200-server.bin --disconnect" -#eval $CLIENTCMD >> $CLIENTOUT/client201.txt 2>&1 || true & -#PIDVAL2=$! -#echo "$CLIENTCMD -- $PIDVAL2" -#wait $PIDVAL2 -#wait $PIDVAL1 -#echo "Non-Ephemeral Test Complete." -# - -echo "CONNECTION TESTS FINISHED" + +echo "EPHEMERAL CONNECTION TESTS FINISHED" ############################################################################### -# Test authenticated connections +# Test ephemeral authenticated connections ############################################################################### -echo "TESTING AUTHENTICATED CONNECTIONS..." -echo "Testing Ephemeral Initialization..." +echo "TESTING EPHEMERAL AUTHENTICATED CONNECTIONS..." # Initiate server CLIENTCMD="timeout 240s ../bin/client connection --ephemeral -s blob202 --authenticated $CONNECTIONOPTS --writeContact $CLIENTOUT/client202-server.bin -l $CLIENTOUT/client202.log --startServer --serverTimeout 2m" eval $CLIENTCMD > $CLIENTOUT/client202.txt 2>&1 || true & @@ -1190,35 +1158,62 @@ PIDVAL2=$! echo "$CLIENTCMD -- $PIDVAL2" wait $PIDVAL2 wait $PIDVAL1 -echo "Ephemeral test complete." - -# TODO: TEST NON-EPHEMERAL CODE-PATH WHEN SUPPORTED -#echo "Testing Non-Ephemeral Initialization..." -## Initiate server -#CLIENTCMD="timeout 240s ../bin/client connection -s blob202 --authenticated $CONNECTIONOPTS --writeContact $CLIENTOUT/client202-server.bin -l $CLIENTOUT/client202.log --startServer --serverTimeout 2m" -#eval $CLIENTCMD > $CLIENTOUT/client202.txt 2>&1 || true & -#PIDVAL1=$! -#echo "$CLIENTCMD -- $PIDVAL1" -#echo "Sleeping to ensure connection server instantiation" -#sleep 5 -# -## Initiate client and send message to server -#CLIENTCMD="timeout 240s ../bin/client connection -s blob203 --authenticated --connect $CLIENTOUT/client202-server.bin $CONNECTIONOPTS -l $CLIENTOUT/client203.log -m \"Hello 202 from 203, using connections\" --receiveCount 0" -#eval $CLIENTCMD > $CLIENTOUT/client203.txt 2>&1 || true & -#PIDVAL2=$! -#echo "$CLIENTCMD -- $PIDVAL2" -#wait $PIDVAL2 -# -## Disconnect -#CLIENTCMD="timeout 240s ../bin/client connection -s blob203 --authenticated $CONNECTIONOPTS -l $CLIENTOUT/client203.log --connect $CLIENTOUT/client202-server.bin --disconnect" -#eval $CLIENTCMD >> $CLIENTOUT/client203.txt 2>&1 || true & -#PIDVAL2=$! -#echo "$CLIENTCMD -- $PIDVAL2" -#wait $PIDVAL2 -#wait $PIDVAL1 -#echo "Non-Ephemeral Test Complete." - -echo "AUTHENTICATED CONNECTION TESTS FINISHED" + +echo "EPHEMERAL AUTHENTICATED CONNECTION TESTS FINISHED" + +############################################################################### +# Test non-ephemeral authenticated connections +############################################################################### + +echo "TESTING NON-EPHEMERAL CONNECTIONS" +# Initiate server +CLIENTCMD="timeout 240s ../bin/client connection -s blob204 $CONNECTIONOPTS --writeContact $CLIENTOUT/client204-server.bin -l $CLIENTOUT/client204.log --startServer --serverTimeout 2m" +eval $CLIENTCMD > $CLIENTOUT/client204.txt 2>&1 || true & +PIDVAL1=$! +echo "$CLIENTCMD -- $PIDVAL1" +echo "Sleeping to ensure connection server instantiation" +sleep 5 +# Initiate client and send message to server +CLIENTCMD="timeout 240s ../bin/client connection -s blob205 --connect $CLIENTOUT/client204-server.bin $CONNECTIONOPTS -l $CLIENTOUT/client205.log -m \"Hello 204 from 205, using connections\" --receiveCount 0" +eval $CLIENTCMD > $CLIENTOUT/client205.txt 2>&1 || true & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL2" +wait $PIDVAL2 + +# Disconnect +CLIENTCMD="timeout 240s ../bin/client connection -s blob205 $CONNECTIONOPTS -l $CLIENTOUT/client205.log --connect $CLIENTOUT/client204-server.bin --disconnect" +eval $CLIENTCMD >> $CLIENTOUT/client205.txt 2>&1 || true & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL2" +wait $PIDVAL2 +wait $PIDVAL1 +echo "NON-EPHEMERAL CONNECTION TEST FINISHED." + + +echo "TESTING EPHEMERAL AUTHENTICATED CONNECTIONS..." +# Initiate server +CLIENTCMD="timeout 240s ../bin/client connection -s blob206 --authenticated $CONNECTIONOPTS --writeContact $CLIENTOUT/client206-server.bin -l $CLIENTOUT/client206.log --startServer --serverTimeout 2m" +eval $CLIENTCMD > $CLIENTOUT/client206.txt 2>&1 || true & +PIDVAL1=$! +echo "$CLIENTCMD -- $PIDVAL1" +echo "Sleeping to ensure connection server instantiation" +sleep 5 + +# Initiate client and send message to server +CLIENTCMD="timeout 240s ../bin/client connection -s blob207 --authenticated --connect $CLIENTOUT/client206-server.bin $CONNECTIONOPTS -l $CLIENTOUT/client207.log -m \"Hello 206 from 207, using connections\" --receiveCount 0" +eval $CLIENTCMD > $CLIENTOUT/client207.txt 2>&1 || true & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL2" +wait $PIDVAL2 + +# Disconnect +CLIENTCMD="timeout 240s ../bin/client connection -s blob207 --authenticated $CONNECTIONOPTS -l $CLIENTOUT/client207.log --connect $CLIENTOUT/client206-server.bin --disconnect" +eval $CLIENTCMD >> $CLIENTOUT/client207.txt 2>&1 || true & +PIDVAL2=$! +echo "$CLIENTCMD -- $PIDVAL2" +wait $PIDVAL2 +wait $PIDVAL1 +echo "Non-Ephemeral Test Complete." echo "TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."