diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index d20ca9066..bebb51735 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -149,7 +149,7 @@ void start_web_server(int port, bool ssl) "ssl.pemfile = \"server.pem\"\n"; f.close(); - system("lighttpd -f lighty_config &"); + system("lighttpd -f lighty_config 2> lighty.err >lighty.log &"); test_sleep(1000); } diff --git a/test/test_http_connection.cpp b/test/test_http_connection.cpp index 3b44dfd02..6cd6843a4 100644 --- a/test/test_http_connection.cpp +++ b/test/test_http_connection.cpp @@ -87,8 +87,6 @@ void http_handler(error_code const& ec, http_parser const& parser } } print_http_header(parser); - - cq.close(); } void reset_globals() @@ -109,7 +107,7 @@ void run_test(std::string const& url, int size, int status, int connected boost::shared_ptr h(new http_connection(ios, cq , &::http_handler, true, &::http_connect_handler)); - h->get(url, seconds(5), 0, &ps); + h->get(url, seconds(1), 0, &ps); ios.reset(); error_code e; ios.run(e); @@ -162,7 +160,10 @@ int test_main() { std::srand(std::time(0)); std::generate(data_buffer, data_buffer + sizeof(data_buffer), &std::rand); - std::ofstream("test_file").write(data_buffer, 3216); + std::ofstream test_file("test_file", std::ios::trunc); + test_file.write(data_buffer, 3216); + TEST_CHECK(test_file.good()); + test_file.close(); std::system("gzip -9 -c test_file > test_file.gz"); proxy_settings ps;