summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/tests/topictest9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/tests/topictest b/cpp/src/tests/topictest
index 21387ac3bd..e03c033f6d 100755
--- a/cpp/src/tests/topictest
+++ b/cpp/src/tests/topictest
@@ -9,6 +9,11 @@ SUBSCRIBERS=10
MESSAGES=2000
BATCHES=10
+# Setup path to publisher/subscriber
+dir=$(dirname $0)
+publisher=$dir/topic_publisher
+subscriber=$dir/topic_listener
+
while getopts "s:m:b:" opt ; do
case $opt in
s) SUBSCRIBERS=$OPTARG ;;
@@ -24,11 +29,11 @@ done
subscribe() {
echo Start subscriber $1
LOG="subscriber_$1.log"
- ./topic_listener > $LOG 2>&1 && rm -f $LOG
+ $subscriber > $LOG 2>&1 && rm -f $LOG
}
publish() {
- ./topic_publisher --messages $MESSAGES --batches $BATCHES --subscribers $SUBSCRIBERS
+ $publisher --messages $MESSAGES --batches $BATCHES --subscribers $SUBSCRIBERS
}
for ((i=$SUBSCRIBERS ; i--; )); do