summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-06-14 13:44:00 +0000
committerAlan Conway <aconway@apache.org>2010-06-14 13:44:00 +0000
commit9cf58ef6be38185c9a9d5325fb2dd522aa774529 (patch)
treec2222b6b9e8ce1d606328c48dd1050730c31baea /cpp/src
parent41d44830e874f191ec273352483989ec7ee96f14 (diff)
downloadqpid-python-9cf58ef6be38185c9a9d5325fb2dd522aa774529.tar.gz
Rename tests qpid_* to qpid-* for consistency.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954471 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/tests/CMakeLists.txt12
-rw-r--r--cpp/src/tests/Makefile.am29
-rwxr-xr-xcpp/src/tests/qpid-cpp-benchmark (renamed from cpp/src/tests/qpid_cpp_benchmark)6
-rw-r--r--cpp/src/tests/qpid-ping.cpp (renamed from cpp/src/tests/qpid_ping.cpp)0
-rw-r--r--cpp/src/tests/qpid-receive.cpp (renamed from cpp/src/tests/qpid_receive.cpp)4
-rw-r--r--cpp/src/tests/qpid-send.cpp (renamed from cpp/src/tests/qpid_send.cpp)10
-rw-r--r--cpp/src/tests/qpid-stream.cpp (renamed from cpp/src/tests/qpid_stream.cpp)14
-rwxr-xr-xcpp/src/tests/ssl_test14
8 files changed, 42 insertions, 47 deletions
diff --git a/cpp/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt
index 9b7e22ab51..09865caca5 100644
--- a/cpp/src/tests/CMakeLists.txt
+++ b/cpp/src/tests/CMakeLists.txt
@@ -264,13 +264,13 @@ target_link_libraries (sender qpidmessaging)
#sender_SOURCES=sender.cpp TestOptions.h ConnectionOptions.h
remember_location(sender)
-add_executable (qpid_receive qpid_receive.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (qpid_receive qpidmessaging)
-remember_location(qpid_receive)
+add_executable (qpid-receive qpid-receive.cpp Statistics.cpp ${platform_test_additions})
+target_link_libraries (qpid-receive qpidmessaging)
+remember_location(qpid-receive)
-add_executable (qpid_send qpid_send.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (qpid_send qpidmessaging)
-remember_location(qpid_send)
+add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions})
+target_link_libraries (qpid-send qpidmessaging)
+remember_location(qpid-send)
# qpid-perftest and qpid-latency-test are generally useful so install them
install (TARGETS qpid-perftest qpid-latency-test RUNTIME
diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am
index bb9628df52..d800583385 100644
--- a/cpp/src/tests/Makefile.am
+++ b/cpp/src/tests/Makefile.am
@@ -127,14 +127,6 @@ if HAVE_XML
unit_test_SOURCES+= XmlClientSessionTest.cpp
endif
-
-# Disabled till we move to amqp_0_10 codec.
-# amqp_0_10/serialize.cpp allSegmentTypes.h \
-# amqp_0_10/ProxyTemplate.cpp \
-# amqp_0_10/apply.cpp \
-# amqp_0_10/Map.cpp \
-# amqp_0_10/handlers.cpp
-
TESTLIBFLAGS = -module -rpath $(abs_builddir)
check_LTLIBRARIES += libshlibtest.la
@@ -153,6 +145,9 @@ include ssl.mk
endif
# Test programs that are installed and therefore built as part of make, not make check
+
+qpidtest_SCRIPTS += qpid-cpp-benchmark
+
qpidtest_PROGRAMS += receiver
receiver_SOURCES = \
receiver.cpp \
@@ -168,18 +163,18 @@ sender_SOURCES = \
Statistics.cpp
sender_LDADD = $(lib_messaging)
-qpidtest_PROGRAMS += qpid_receive
+qpidtest_PROGRAMS += qpid-receive
qpid_receive_SOURCES = \
- qpid_receive.cpp \
+ qpid-receive.cpp \
TestOptions.h \
ConnectionOptions.h \
Statistics.h \
Statistics.cpp
qpid_receive_LDADD = $(lib_messaging)
-qpidtest_PROGRAMS += qpid_send
+qpidtest_PROGRAMS += qpid-send
qpid_send_SOURCES = \
- qpid_send.cpp \
+ qpid-send.cpp \
TestOptions.h \
ConnectionOptions.h \
Statistics.h \
@@ -216,9 +211,9 @@ qpid_topic_publisher_INCLUDES=$(PUBLIC_INCLUDES)
qpid_topic_publisher_SOURCES=qpid-topic-publisher.cpp TestOptions.h ConnectionOptions.h
qpid_topic_publisher_LDADD=$(lib_client)
-qpidtest_PROGRAMS+=qpid_ping
+qpidtest_PROGRAMS+=qpid-ping
qpid_ping_INCLUDES=$(PUBLIC_INCLUDES)
-qpid_ping_SOURCES=qpid_ping.cpp test_tools.h TestOptions.h ConnectionOptions.h
+qpid_ping_SOURCES=qpid-ping.cpp test_tools.h TestOptions.h ConnectionOptions.h
qpid_ping_LDADD=$(lib_client)
#
@@ -299,10 +294,10 @@ check_PROGRAMS+=qrsh
qrsh_SOURCES=qrsh.cpp
qrsh_LDADD=$(lib_client)
-check_PROGRAMS+=qpid_stream
+check_PROGRAMS+=qpid-stream
qpid_stream_INCLUDES=$(PUBLIC_INCLUDES)
-qpid_stream_SOURCES=qpid_stream.cpp
-qpid_stream_LDADD=$(lib_messaging)
+qpid_stream_SOURCES=qpid-stream.cpp
+qpid_stream_LDADD=$(lib_messaging)
TESTS_ENVIRONMENT = \
VALGRIND=$(VALGRIND) \
diff --git a/cpp/src/tests/qpid_cpp_benchmark b/cpp/src/tests/qpid-cpp-benchmark
index 7f9e5ce393..b8a74a2b90 100755
--- a/cpp/src/tests/qpid_cpp_benchmark
+++ b/cpp/src/tests/qpid-cpp-benchmark
@@ -38,7 +38,7 @@ op.add_option("--queue-name", default="benchmark",
help="base name for queues (default %default)")
op.add_option("--send-rate", default=0, metavar="R",
help="send rate limited to R messages/second, 0 means no limit (default %default)")
-op.add_option("--content-size", default=1024, type="int", metavar="BYTES",
+op.add_option("--content-size", default=1024, type="int", metavar="BYTES",
help="message size in bytes (default %default)")
op.add_option("--ack-frequency", default=0, metavar="N", type="int",
help="receiver ack's every N messages, 0 means unconfirmed")
@@ -54,7 +54,7 @@ op.add_option("--no-timestamp", dest="timestamp", default=True,
def start_receive(queue, opts, ready_queue):
address="%s;{%s}"%(queue,",".join(["create:always"]+opts.receive_option))
- return Popen(["qpid_receive",
+ return Popen(["qpid-receive",
"-b", opts.broker,
"-a", address,
"--forever",
@@ -68,7 +68,7 @@ def start_receive(queue, opts, ready_queue):
def start_send(queue, opts):
address="%s;{%s}"%(queue,",".join(opts.send_option))
- return Popen(["qpid_send",
+ return Popen(["qpid-send",
"-b", opts.broker,
"-a", address,
"--messages", str(opts.messages),
diff --git a/cpp/src/tests/qpid_ping.cpp b/cpp/src/tests/qpid-ping.cpp
index 0cb4afa0ee..0cb4afa0ee 100644
--- a/cpp/src/tests/qpid_ping.cpp
+++ b/cpp/src/tests/qpid-ping.cpp
diff --git a/cpp/src/tests/qpid_receive.cpp b/cpp/src/tests/qpid-receive.cpp
index 294a60b8cc..a0394ccd21 100644
--- a/cpp/src/tests/qpid_receive.cpp
+++ b/cpp/src/tests/qpid-receive.cpp
@@ -122,7 +122,7 @@ struct Options : public qpid::Options
qpid::log::Logger::instance().configure(log);
if (help) {
std::ostringstream msg;
- std::cout << msg << *this << std::endl << std::endl
+ std::cout << msg << *this << std::endl << std::endl
<< "Drains messages from the specified address" << std::endl;
return false;
} else {
@@ -179,7 +179,7 @@ int main(int argc, char ** argv)
Duration timeout = opts.getTimeout();
bool done = false;
Reporter<ThroughputAndLatency> reporter(std::cout, opts.reportEvery, opts.reportHeader);
- if (!opts.readyAddress.empty())
+ if (!opts.readyAddress.empty())
session.createSender(opts.readyAddress).send(msg);
while (!done && receiver.fetch(msg, timeout)) {
reporter.message(msg);
diff --git a/cpp/src/tests/qpid_send.cpp b/cpp/src/tests/qpid-send.cpp
index 98d7cd60aa..7e96cc1a09 100644
--- a/cpp/src/tests/qpid_send.cpp
+++ b/cpp/src/tests/qpid-send.cpp
@@ -136,7 +136,7 @@ struct Options : public qpid::Options
qpid::log::Logger::instance().configure(log);
if (help) {
std::ostringstream msg;
- std::cout << msg << *this << std::endl << std::endl
+ std::cout << msg << *this << std::endl << std::endl
<< "Drains messages from the specified address" << std::endl;
return false;
} else {
@@ -173,7 +173,7 @@ struct Options : public qpid::Options
message.getProperties()[name] = value;
} else {
message.getProperties()[name] = Variant();
- }
+ }
}
void setProperties(Message& message) const
@@ -279,7 +279,7 @@ int main(int argc, char ** argv)
contentGen.reset(new MapContentGenerator(opts));
else if (opts.contentSize > 0)
contentGen.reset(new FixedContentGenerator(string(opts.contentSize, 'X')));
- else
+ else
contentGen.reset(new FixedContentGenerator(opts.contentString));
qpid::sys::AbsTime start = qpid::sys::now();
@@ -288,9 +288,9 @@ int main(int argc, char ** argv)
while (contentGen->setContent(msg)) {
++sent;
- if (opts.sequence)
+ if (opts.sequence)
msg.getProperties()[SN] = sent;
- if (opts.timestamp)
+ if (opts.timestamp)
msg.getProperties()[TS] = int64_t(
qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()));
sender.send(msg);
diff --git a/cpp/src/tests/qpid_stream.cpp b/cpp/src/tests/qpid-stream.cpp
index 2ccf27bdb9..f02a484750 100644
--- a/cpp/src/tests/qpid_stream.cpp
+++ b/cpp/src/tests/qpid-stream.cpp
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -37,7 +37,7 @@ using namespace qpid::types;
namespace qpid {
namespace tests {
-struct Args : public qpid::Options
+struct Args : public qpid::Options
{
std::string url;
std::string address;
@@ -48,7 +48,7 @@ struct Args : public qpid::Options
uint senderCapacity;
uint ackFrequency;
- Args() :
+ Args() :
url("amqp:tcp:127.0.0.1:5672"),
address("test-queue"),
size(512),
@@ -160,9 +160,9 @@ struct Consume : Client
totalLatency += latency;
if (received % opts.rate == 0) {
- std::cout << "count=" << received
- << ", avg=" << (totalLatency/received)
- << ", min=" << minLatency
+ std::cout << "count=" << received
+ << ", avg=" << (totalLatency/received)
+ << ", min=" << minLatency
<< ", max=" << maxLatency << std::endl;
}
}
diff --git a/cpp/src/tests/ssl_test b/cpp/src/tests/ssl_test
index a03341ec5b..35c0033ce8 100755
--- a/cpp/src/tests/ssl_test
+++ b/cpp/src/tests/ssl_test
@@ -77,8 +77,8 @@ export QPID_SSL_CERT_PASSWORD_FILE=${CERT_PW_FILE}
## Test connection with a URL
URL=amqp:ssl:$TEST_HOSTNAME:$PORT
-./qpid_send -b $URL --content-string=hello -a "foo;{create:always}"
-MSG=`./qpid_receive -b $URL -a "foo;{create:always}" --messages 1`
+./qpid-send -b $URL --content-string=hello -a "foo;{create:always}"
+MSG=`./qpid-receive -b $URL -a "foo;{create:always}" --messages 1`
test "$MSG" = "hello" || { echo "receive failed '$MSG' != 'hello'"; exit 1; }
test -z $CLUSTER_LIB && exit 0 # Exit if cluster not supported.
@@ -95,7 +95,7 @@ pick_port() {
ssl_cluster_broker() { # $1 = port
../qpidd $COMMON_OPTS --load-module $CLUSTER_LIB --cluster-name ssl_test.$HOSTNAME.$$ --cluster-url amqp:ssl:$TEST_HOSTNAME:$1 --port 0 --ssl-port $1 --transport ssl > /dev/null
# Wait for broker to be ready
- qpid_ping -Pssl -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; }
+ qpid-ping -Pssl -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; }
echo "Running SSL cluster broker on port $1"
}
@@ -103,11 +103,11 @@ PORT1=`pick_port`; ssl_cluster_broker $PORT1
PORT2=`pick_port`; ssl_cluster_broker $PORT2
# Pipe receive output to uniq to remove duplicates
-./qpid_receive --connection-options "{reconnect-timeout:5}" --failover-updates -b amqp:ssl:$TEST_HOSTNAME:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp &
-./qpid_send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=one -a "foo;{create:always}"
+./qpid-receive --connection-options "{reconnect-timeout:5}" --failover-updates -b amqp:ssl:$TEST_HOSTNAME:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp &
+./qpid-send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=one -a "foo;{create:always}"
../qpidd --no-module-dir -qp $PORT1 # Kill broker 1 receiver should fail-over.
-./qpid_send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1
-wait # Wait for qpid_receive
+./qpid-send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1
+wait # Wait for qpid-receive
{ echo one; echo two; } > ssl_test_receive.cmp
diff ssl_test_receive.tmp ssl_test_receive.cmp || { echo "Failover failed"; exit 1; }
rm -f ssl_test_receive.*