summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster_authentication_soak.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-05-27 20:02:30 +0000
committerAlan Conway <aconway@apache.org>2010-05-27 20:02:30 +0000
commit9557857f8f36d2f942ee761d37234cd09e6c186a (patch)
tree28cc64b3af9df203d6d13632a8acebf9adbeb9d5 /qpid/cpp/src/tests/cluster_authentication_soak.cpp
parente41664eafd017f9eb9c675f573c4ae75eb476402 (diff)
downloadqpid-python-9557857f8f36d2f942ee761d37234cd09e6c186a.tar.gz
Fix problems with cluster_authentication_soak test in VPATH build.
- Fix SASL version testing logic in cluster_authentication_soak and SaslAuthenticator - Generate all SASL config in the build directory in sasl_test_setup.sh - Compile cluster_authentication_soak only if SASL is available. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@948968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/cluster_authentication_soak.cpp')
-rw-r--r--qpid/cpp/src/tests/cluster_authentication_soak.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/qpid/cpp/src/tests/cluster_authentication_soak.cpp b/qpid/cpp/src/tests/cluster_authentication_soak.cpp
index 9e878be6d1..31714a19a6 100644
--- a/qpid/cpp/src/tests/cluster_authentication_soak.cpp
+++ b/qpid/cpp/src/tests/cluster_authentication_soak.cpp
@@ -43,6 +43,7 @@
#include <ForkedBroker.h>
#include <qpid/client/Connection.h>
+#include <sasl/sasl.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -117,13 +118,13 @@ bool
runPerftest ( bool hangTest ) {
stringstream portSs;
portSs << newbiePort;
-
+ string portStr = portSs.str();
char const * path = "./qpid-perftest";
vector<char const *> argv;
argv.push_back ( "./qpid-perftest" );
argv.push_back ( "-p" );
- argv.push_back ( portSs.str().c_str() );
+ argv.push_back ( portStr.c_str() );
argv.push_back ( "--username" );
argv.push_back ( "zig" );
argv.push_back ( "--password" );
@@ -166,7 +167,7 @@ runPerftest ( bool hangTest ) {
if ( returned_pid == pid ) {
int exit_status = WEXITSTATUS(status);
if ( exit_status ) {
- cerr << "qpid-perftest failed. exit_status was: " << exit_status;
+ cerr << "qpid-perftest failed. exit_status was: " << exit_status << endl;
return false;
}
else {
@@ -242,9 +243,10 @@ int
main ( int argc, char ** argv )
{
// I need the SASL_PATH_TYPE_CONFIG feature, which did not appear until SASL 2.1.22
- #if (SASL_VERSION_MAJOR < 2) || (SASL_VERSION_MINOR < 1) || (SASL_VERSION_STEP < 22)
+#if (SASL_VERSION_FULL < ((2<<16)|(1<<8)|22))
+ cout << "Skipping SASL test, SASL version too low." << endl;
return 0;
- #endif
+#endif
int n_iterations = argc > 1 ? atoi(argv[1]) : 1;
runSilent = argc > 2 ? atoi(argv[2]) : 1; // default to silent
@@ -253,12 +255,6 @@ main ( int argc, char ** argv )
int n_brokers = 3;
brokerVector brokers;
- #ifndef HAVE_SASL
- if ( ! runSilent )
- cout << "No SASL support. cluster_authentication_soak disabled.";
- return 0;
- #endif
-
srand ( getpid() );
string clusterName;
makeClusterName ( clusterName );