Skip to content

Commit

Permalink
add script to run a test gossip network, requires xterm
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiazlo committed Nov 15, 2018
1 parent e0fdb07 commit b9af24a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/gossip/run_gossip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

master="127.0.0.1:9000"
go run $GOPATH/src/github.com/bbva/qed/main.go agent -k key -l silent --bind $master --node 0 --role server &
pids[0]=$!
sleep 1s

for i in `seq 1 $1`;
do
xterm -hold -e "go run $GOPATH/src/github.com/bbva/qed/main.go agent -k key -l silent --bind 127.0.0.1:900$i --join $master --node $i --role monitor" &
pids[${i}]=$!
done

for pid in ${pids[*]}; do
echo waiting for pid $pid
wait $pid
done

0 comments on commit b9af24a

Please sign in to comment.