diff --git a/tests/libtransport/HTTPRequest.cpp b/tests/libtransport/HTTPRequest.cpp index 0954d92b2873e84d32a2dae85204c3bfd786582e..91f879e42d89d204e4c29bf87217a5608ae3400d 100644 --- a/tests/libtransport/HTTPRequest.cpp +++ b/tests/libtransport/HTTPRequest.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -20,10 +21,6 @@ using namespace Transport; #define get_value_or(X) substr() #endif -#ifdef _MSC_VER -#define sleep Sleep -#endif - class HTTPRequestTest : public CPPUNIT_NS :: TestFixture, public BasicTest { CPPUNIT_TEST_SUITE(HTTPRequestTest); CPPUNIT_TEST(GETThreadPool); @@ -61,7 +58,9 @@ class HTTPRequestTest : public CPPUNIT_NS :: TestFixture, public BasicTest { int i = 0; while (result == false && i < 5) { - sleep(1); + boost::system_time time = boost::get_system_time(); + time += boost::posix_time::seconds(1); + boost::thread::sleep(time); loop->processEvents(); i++; }