From f0be160b6ea7312bf10fdbbbf7ea1580e7c833ce Mon Sep 17 00:00:00 2001
From: Rick Carback <rick@privategrity.com>
Date: Wed, 10 Jun 2020 02:01:19 +0000
Subject: [PATCH] Final edits to make integration work again

---
 basice2e/gateway-1.yaml     |  2 +-
 basice2e/gateway-2.yaml     |  2 +-
 basice2e/gateway-3.yaml     |  2 +-
 basice2e/gateway-4.yaml     |  2 +-
 basice2e/gateway-5.yaml     |  2 +-
 basice2e/permissioning.yaml |  2 +-
 basice2e/rid.txt            |  2 +-
 basice2e/run.sh             | 20 +++++++++++---------
 8 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/basice2e/gateway-1.yaml b/basice2e/gateway-1.yaml
index 3b3fd98..a57e6f3 100644
--- a/basice2e/gateway-1.yaml
+++ b/basice2e/gateway-1.yaml
@@ -9,7 +9,7 @@
 log: "results/gateways/gateway-1.log"
 
 # Log message level
-logLevel: 2
+logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
 nodeAddress: "127.0.0.1:50000"
diff --git a/basice2e/gateway-2.yaml b/basice2e/gateway-2.yaml
index c1f2124..acc4bc2 100644
--- a/basice2e/gateway-2.yaml
+++ b/basice2e/gateway-2.yaml
@@ -9,7 +9,7 @@
 log: "results/gateways/gateway-2.log"
 
 # Log message level
-logLevel: 2
+logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
 nodeAddress: "127.0.0.1:50001"
diff --git a/basice2e/gateway-3.yaml b/basice2e/gateway-3.yaml
index 95c3021..f083ee4 100644
--- a/basice2e/gateway-3.yaml
+++ b/basice2e/gateway-3.yaml
@@ -9,7 +9,7 @@
 log: "results/gateways/gateway-3.log"
 
 # Log message level
-logLevel: 2
+logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
 nodeAddress: "127.0.0.1:50002"
diff --git a/basice2e/gateway-4.yaml b/basice2e/gateway-4.yaml
index 911300e..721ab28 100644
--- a/basice2e/gateway-4.yaml
+++ b/basice2e/gateway-4.yaml
@@ -9,7 +9,7 @@
 log: "results/gateways/gateway-4.log"
 
 # Log message level
-logLevel: 2
+logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
 nodeAddress: "127.0.0.1:50003"
diff --git a/basice2e/gateway-5.yaml b/basice2e/gateway-5.yaml
index 15a955c..870d534 100644
--- a/basice2e/gateway-5.yaml
+++ b/basice2e/gateway-5.yaml
@@ -9,7 +9,7 @@
 log: "results/gateways/gateway-5.log"
 
 # Log message level
-logLevel: 2
+logLevel: 1
 
 # The public IP address and port of the node associated with this gateway
 nodeAddress: "127.0.0.1:50004"
diff --git a/basice2e/permissioning.yaml b/basice2e/permissioning.yaml
index a13b2ea..ee32042 100644
--- a/basice2e/permissioning.yaml
+++ b/basice2e/permissioning.yaml
@@ -3,7 +3,7 @@
 # ==================================
 
 # Log message level
-logLevel: 1
+logLevel: 2
 
 # Path to log file
 logPath: "results/permissioning.log"
diff --git a/basice2e/rid.txt b/basice2e/rid.txt
index 93b803a..adc7797 100644
--- a/basice2e/rid.txt
+++ b/basice2e/rid.txt
@@ -1 +1 @@
-INFO 2020/06/09 21:26:42 [ObxCt0P+rLWv+0yrCK8v/2x8DXTSBLdN1NKO6YYS930C:50004]: RID 0 ReceiveFinishRealtime END
+INFO 2020/06/10 01:53:31 [ObxCt0P+rLWv+0yrCK8v/2x8DXTSBLdN1NKO6YYS930C:50004]: RID 1 ReceiveFinishRealtime END
diff --git a/basice2e/run.sh b/basice2e/run.sh
index 88c2530..a3d4b23 100755
--- a/basice2e/run.sh
+++ b/basice2e/run.sh
@@ -28,14 +28,6 @@ mkdir -p $GATEWAYLOGS
 mkdir -p $CLIENTOUT
 mkdir -p $CLIENTCLEAN
 
-# Start a user discovery bot server
-echo "STARTING UDB..."
-UDBCMD="../bin/udb --logLevel 3 --config udb.yaml -l 1"
-$UDBCMD >> $UDBOUT 2>&1 &
-PIDVAL=$!
-echo $PIDVAL >> results/serverpids
-echo "$UDBCMD -- $PIDVAL"
-
 echo "STARTING SERVERS..."
 
 PERMCMD="../bin/permissioning -c permissioning.yaml "
@@ -96,11 +88,21 @@ cnt=0
 echo -n "Waiting for a round to run"
 while [ ! -s rid.txt ] && [ $cnt -lt 120 ]; do
     sleep 1
-    cat results/servers/server-5.log | grep "RID 0 ReceiveFinishRealtime END" > rid.txt || true
+    grep -a "RID 1 ReceiveFinishRealtime END" results/servers/server-5.log > rid.txt || true
     cnt=$(($cnt + 1))
     echo -n "."
 done
 
+# Start a user discovery bot server
+echo "STARTING UDB..."
+UDBCMD="../bin/udb --logLevel 3 --config udb.yaml -l 1"
+$UDBCMD >> $UDBOUT 2>&1 &
+PIDVAL=$!
+echo $PIDVAL >> results/serverpids
+echo "$UDBCMD -- $PIDVAL"
+
+sleep 5
+
 runclients() {
     echo "Starting clients..."
 
-- 
GitLab