Commit ee2e261f authored by Vitaly Takmazov's avatar Vitaly Takmazov

using boost::thread::sleep, fixes tests under MSVC

parent e89fbf32
#include <boost/thread/thread.hpp>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <Swiften/Swiften.h>
......@@ -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++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment