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 | 9fee311bc73f83716ada431621ec86da386c96ec (patch) | |
tree | babd0875584b21aacddb0958a553eba09e353b77 | |
parent | d7f9f52220b2f820461ea183e1edc8ff6a402dff (diff) | |
download | qpid-python-9fee311bc73f83716ada431621ec86da386c96ec.tar.gz |
Use qpid sleep rather than CRT sleep to build on Windows
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@740121 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/tests/ClientSessionTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/src/tests/ClientSessionTest.cpp b/qpid/cpp/src/tests/ClientSessionTest.cpp index 2d9239131e..f0c7c1d0c6 100644 --- a/qpid/cpp/src/tests/ClientSessionTest.cpp +++ b/qpid/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; |