summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-02-02 22:11:20 +0000
committerStephen D. Huston <shuston@apache.org>2009-02-02 22:11:20 +0000
commitc39405557bb172efe1eb75753bbfb00616f45268 (patch)
tree258dd0b6578d933ad9e8f3c8950d1bc8a5e331bf /cpp/src
parent654f028390fba5d2eb731ff78f9f2799877ca87f (diff)
downloadqpid-python-c39405557bb172efe1eb75753bbfb00616f45268.tar.gz
Use qpid sleep rather than CRT sleep to build on Windows
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/tests/ClientSessionTest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp
index 2d9239131e..f0c7c1d0c6 100644
--- a/cpp/src/tests/ClientSessionTest.cpp
+++ b/cpp/src/tests/ClientSessionTest.cpp
@@ -25,6 +25,7 @@
#include "qpid/sys/Monitor.h"
#include "qpid/sys/Thread.h"
#include "qpid/sys/Runnable.h"
+#include "qpid/sys/Time.h"
#include "qpid/client/Session.h"
#include "qpid/framing/TransferContent.h"
#include "qpid/framing/reply_exceptions.h"
@@ -223,7 +224,7 @@ struct DelayedTransfer : sys::Runnable
void run()
{
- sleep(1);
+ qpid::sys::sleep(1);
fixture.session.messageTransfer(arg::content=Message("foo2", "getq"));
}
};
@@ -275,7 +276,7 @@ QPID_AUTO_TEST_CASE(testPeriodicExpiration) {
}
BOOST_CHECK_EQUAL(fix.session.queueQuery(string("my-queue")).getMessageCount(), 10u);
- sleep(2);
+ qpid::sys::sleep(2);
BOOST_CHECK_EQUAL(fix.session.queueQuery(string("my-queue")).getMessageCount(), 5u);
}
@@ -289,7 +290,7 @@ QPID_AUTO_TEST_CASE(testExpirationOnPop) {
fix.session.messageTransfer(arg::content=m);
}
- ::usleep(300* 1000);
+ qpid::sys::usleep(300* 1000);
for (uint i = 0; i < 10; i++) {
if (i % 2) continue;