diff options
author | Stephen D. Huston <shuston@apache.org> | 2009-02-02 22:11:20 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2009-02-02 22:11:20 +0000 |
commit | c39405557bb172efe1eb75753bbfb00616f45268 (patch) | |
tree | 258dd0b6578d933ad9e8f3c8950d1bc8a5e331bf /cpp/src/tests/ClientSessionTest.cpp | |
parent | 654f028390fba5d2eb731ff78f9f2799877ca87f (diff) | |
download | qpid-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/tests/ClientSessionTest.cpp')
-rw-r--r-- | cpp/src/tests/ClientSessionTest.cpp | 7 |
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; |