diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..cc2a8e114f5a308c3d72e0f451f408c1053e9358 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Ignore Jetbrains IDE folder +.idea/* +bin/* +*.log +*results* +*/.udb-cMix-session +blob* diff --git a/basice2e/clients.goldoutput/client2122.out b/basice2e/clients.goldoutput/client2122.out deleted file mode 100644 index 50a0d726bcecbcb73748ff04661ed2a0bb50428b..0000000000000000000000000000000000000000 --- a/basice2e/clients.goldoutput/client2122.out +++ /dev/null @@ -1,2 +0,0 @@ -Sending Message to 22, : Hello, 22 -Message from 24, Received: Hello, 21 diff --git a/basice2e/clients.goldoutput/client2223.out b/basice2e/clients.goldoutput/client2223.out deleted file mode 100644 index af930c46bb4f715b46f829e78250bc1f7f669317..0000000000000000000000000000000000000000 --- a/basice2e/clients.goldoutput/client2223.out +++ /dev/null @@ -1,2 +0,0 @@ -Sending Message to 23, : Hello, 23 -Message from 21, Received: Hello, 22 diff --git a/basice2e/clients.goldoutput/client2324.out b/basice2e/clients.goldoutput/client2324.out deleted file mode 100644 index 7b5f808e59276820eb7ab2e59018eaca801b1964..0000000000000000000000000000000000000000 --- a/basice2e/clients.goldoutput/client2324.out +++ /dev/null @@ -1,2 +0,0 @@ -Sending Message to 24, : Hello, 24 -Message from 22, Received: Hello, 23 diff --git a/basice2e/clients.goldoutput/client2421.out b/basice2e/clients.goldoutput/client2421.out deleted file mode 100644 index 4e758a236e242f5c11f57f0c7c5d942b31883d88..0000000000000000000000000000000000000000 --- a/basice2e/clients.goldoutput/client2421.out +++ /dev/null @@ -1,2 +0,0 @@ -Sending Message to 21, : Hello, 21 -Message from 23, Received: Hello, 24 diff --git a/basice2e/run.sh b/basice2e/run.sh index c831c25388a54bd4a667476f3143c5e504501dc6..c4348fbee0a8ecca1513e57eb318ae6e425b0a4c 100755 --- a/basice2e/run.sh +++ b/basice2e/run.sh @@ -52,7 +52,7 @@ trap finish INT sleep 45 # FIXME: We should not need this, but the servers don't respond quickly # enough on boot right now. -export LASTNODE="localhost:50004" +export GATEWAY=localhost:8443 runclients() { echo "Starting clients..." CTR=0 @@ -69,40 +69,7 @@ runclients() { nid=$((($cid % 4) + 1)) eval NICK=\${NICK${cid}} # Send a regular message - CLIENTCMD="timeout 240s ../bin/client -f blob$cid --numnodes 5 -s $LASTNODE -i $cid -d $nid -m \"Hello, $nid\" --noratchet" - eval $CLIENTCMD >> $CLIENTOUT/client$cid$nid.out 2>&1 & - PIDVAL=$! - eval CLIENTS${CTR}=$PIDVAL - echo "$CLIENTCMD -- $PIDVAL" - CTR=$(($CTR + 1)) - done - done - - echo "WAITING FOR $CTR CLIENTS TO EXIT..." - for i in $(seq 0 $(($CTR - 1))) - do - eval echo "Waiting on \${CLIENTS${i}} ..." - eval wait \${CLIENTS${i}} - done -} - -export GATEWAY=localhost:8443 -runclientsgw() { - CTR=0 - - for cid in $(seq 21 24) - do - # TODO: Change the recipients to send multiple messages. We can't - # run multiple clients with the same user id so we need - # updates to make that work. - # for nid in 1 2 3 4; do - - for nid in 1 - do - nid=$((($cid % 4) + 21)) - eval NICK=\${NICK${cid}} - # Send a regular message - CLIENTCMD="timeout 60s ../bin/client -f blobgw$cid --numnodes 5 -g $GATEWAY -s $LASTNODE -i $cid -d $nid -m \"Hello, $nid\" --noratchet" + CLIENTCMD="timeout 240s ../bin/client -f blob$cid --numnodes 5 -g $GATEWAY -i $cid -d $nid -m \"Hello, $nid\" --noratchet" eval $CLIENTCMD >> $CLIENTOUT/client$cid$nid.out 2>&1 & PIDVAL=$! eval CLIENTS${CTR}=$PIDVAL @@ -120,7 +87,7 @@ runclientsgw() { } # Start a channelbot server -CHANNELCMD="../bin/channelbot -v -i 31 --numnodes 5 -s $LASTNODE -f blobchannel" +CHANNELCMD="../bin/channelbot -v -i 31 --numnodes 5 -g $GATEWAY -f blobchannel" $CHANNELCMD >> $CHANNELOUT 2>&1 & PIDVAL=$! echo $PIDVAL >> results/serverpids @@ -134,7 +101,7 @@ echo $PIDVAL >> results/serverpids echo "$UDBCMD -- $PIDVAL" # Start a dummy client -DUMMYCMD="../bin/client -i 35 -d 35 -s $LASTNODE --numnodes 5 -m \"dummy\" --dummyfrequency 3 --noratchet -f blobdummy" +DUMMYCMD="../bin/client -i 35 -d 35 -g $GATEWAY --numnodes 5 -m \"dummy\" --dummyfrequency 3 --noratchet -f blobdummy" $DUMMYCMD >> $DUMMYOUT 2>&1 & PIDVAL=$! echo $PIDVAL >> results/serverpids @@ -150,7 +117,7 @@ echo "$GATEWAYCMD -- $PIDVAL" # Send a registration command cat registration-commands.txt | while read LINE do - CLIENTCMD="timeout 240s ../bin/client -f blob6 --numnodes 5 -s $LASTNODE -i 6 -d 13 -m \"$LINE\" --noratchet" + CLIENTCMD="timeout 240s ../bin/client -f blob6 --numnodes 5 -g $GATEWAY -i 6 -d 13 -m \"$LINE\" --noratchet" eval $CLIENTCMD >> $CLIENTOUT/client6.out 2>&1 & PIDVAL=$! echo "$CLIENTCMD -- $PIDVAL" @@ -158,7 +125,7 @@ do done # Send a channel message that all clients will receive -CLIENTCMD="timeout 240s ../bin/client -f blob5 --numnodes 5 -s $LASTNODE -i 5 -d 31 -m \"Channel, Hello\" --noratchet" +CLIENTCMD="timeout 240s ../bin/client -f blob5 --numnodes 5 -g $GATEWAY -i 5 -d 31 -m \"Channel, Hello\" --noratchet" eval $CLIENTCMD >> $CLIENTOUT/client5.out 2>&1 & PIDVAL=$! echo "$CLIENTCMD -- $PIDVAL" @@ -171,10 +138,6 @@ runclients echo "RUNNING CLIENTS (2nd time)..." runclients -# Same function, different blob names and client IDs -echo "RUNNING CLIENTS THROUGH GATEWAY..." -runclientsgw - # HACK HACK HACK: Remove the ratchet warning from client output for F in $(find results/clients -type f) do diff --git a/basice2e/udb.yaml b/basice2e/udb.yaml index 1423524031dadf82be92db6e8352e2156f11d835..9964e10b406dcedfe8c7c7cb40b6702cd1ee30cf 100644 --- a/basice2e/udb.yaml +++ b/basice2e/udb.yaml @@ -1,4 +1,5 @@ # UDB Config for E2E Integration test logPath: "logfile.log" numNodes: 5 -serverAddr: "localhost:50004" +gateways: + - "localhost:8443"