Project

General

Profile

RE: WResource::handleAbort not always called / Possible ... ยป test_http_streaming.cpp

J n, 09/13/2017 04:47 PM

 
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif

#include "IntegrationTestHelper.hpp"
#include <chrono>

BOOST_FIXTURE_TEST_SUITE(HttpSuite, IntegrationFixture)

BOOST_AUTO_TEST_CASE(continuation_requests_should_work)
{
size_t n = 0;
std::string payload{"HelloHelloHelloHelloHelloHelloHelloHelloHelloHello"};
BOOST_REQUIRE_EQUAL(0,aborted_count());
BOOST_REQUIRE_EQUAL(n,require_http_get_url_scheduled("/test?stream=",eWaitDone));
BOOST_REQUIRE_EQUAL(200,nth_msg(n).status());
BOOST_REQUIRE_EQUAL(boost::system::error_code(),nth_err(n));
BOOST_REQUIRE_EQUAL(payload,nth_msg(n).body());
BOOST_REQUIRE_EQUAL(0,aborted_count());
}

BOOST_AUTO_TEST_SUITE_END()
    (1-1/1)