Skip to content

Commit 691e67e

Browse files
author
Sungjun, Kim
committed
Fix location
1 parent 406fd34 commit 691e67e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

containers/test/test_container_rpc.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ success=false
2525

2626
PORT_RANGE_START=10000
2727
PORT_RANGE_END=20000
28+
RPC_SERVICE_PORT=`perl -e "print int(rand($PORT_RANGE_END-$PORT_RANGE_START)) + $PORT_RANGE_START"`
2829

2930
function clean_up {
3031
# Perform program exit housekeeping
@@ -50,7 +51,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5051
cd $DIR
5152

5253
# Start python rpc test container
53-
RPC_SERVICE_PORT=`perl -e "print int(rand($PORT_RANGE_END-$PORT_RANGE_START)) + $PORT_RANGE_START"`
5454
echo "Starting python RPC test container... (port:$RPC_SERVICE_PORT)"
5555
python ../python/rpc_test_container.py --rpc_service_port $RPC_SERVICE_PORT &
5656

@@ -71,7 +71,6 @@ cd $DIR/../../
7171
cd container
7272
make container_rpc_test
7373
container_uptime_seconds=180
74-
RPC_SERVICE_PORT=`perl -e "print int(rand($PORT_RANGE_END-$PORT_RANGE_START)) + $PORT_RANGE_START"`
7574
echo "Starting cpp RPC test container... (port:$RPC_SERVICE_PORT)"
7675
./container_rpc_test -t $container_uptime_seconds -p $RPC_SERVICE_PORT &
7776

@@ -80,13 +79,11 @@ sleep 10s
8079
cd $DIR/../../debug/src/benchmarks
8180
make rpctest
8281
REDIS_PORT=$1
83-
RPC_SERVICE_PORT=`perl -e "print int(rand($PORT_RANGE_END-$PORT_RANGE_START)) + $PORT_RANGE_START"`
8482
echo "Executing RPC test (first iteration)... (redis port:$REDIS_PORT, rpc_service_port:$RPC_SERVICE_PORT)"
8583
./rpctest --num_containers=2 --timeout_seconds=30 --redis_port $REDIS_PORT --rpc_service_port $RPC_SERVICE_PORT
8684
redis-cli -p $REDIS_PORT "flushall"
8785
echo "Sleeping for 5 seconds..."
8886
sleep 5s
89-
RPC_SERVICE_PORT=`perl -e "print int(rand($PORT_RANGE_END-$PORT_RANGE_START)) + $PORT_RANGE_START"`
9087
echo "Executing RPC test (second iteration)... (redis port:$REDIS_PORT, rpc_service_port:$RPC_SERVICE_PORT)"
9188
./rpctest --num_containers=2 --timeout_seconds=30 --redis_port $REDIS_PORT --rpc_service_port $RPC_SERVICE_PORT
9289
redis-cli -p $REDIS_PORT "flushall"

0 commit comments

Comments
 (0)