anchor.diff:      URL = url(Port, "/slow"),
       ?assertEqual({error, timeout}, lhttpc:request(URL, get, [], 50)).
   
  -connection_timeout() ->
  -    Port = start(gen_tcp, [fun simple_response/5, fun simple_response/5]),
  -    URL = url(Port, "/close_conn"),
  -    lhttpc_manager:update_connection_timeout(50), % very short keep alive
  -    {ok, Response} = lhttpc:request(URL, get, [], 100),
  -    ?assertEqual({200, "OK"}, status(Response)),
  -    ?assertEqual(<<?DEFAULT_STRING>>, body(Response)),
  -    timer:sleep(100),
  -    ?assertEqual(0,
  -        lhttpc_manager:connection_count({"localhost", Port, false})),
  -    lhttpc_manager:update_connection_timeout(300000). % set back
  -
  -suspended_manager() ->
  -    Port = start(gen_tcp, [fun simple_response/5, fun simple_response/5]),
  -    URL = url(Port, "/persistent"),
  -    {ok, FirstResponse} = lhttpc:request(URL, get, [], 50),
  -    ?assertEqual({200, "OK"}, status(FirstResponse)),
  -    ?assertEqual(<<?DEFAULT_STRING>>, body(FirstResponse)),
  -    Pid = whereis(lhttpc_manager),
  -    true = erlang:suspend_process(Pid),
  -    ?assertEqual({error, timeout}, lhttpc:request(URL, get, [], 50)),
  -    true = erlang:resume_process(Pid),
  -    ?assertEqual(1,
  -        lhttpc_manager:connection_count({"localhost", Port, false})),
  -    {ok, SecondResponse} = lhttpc:request(URL, get, [], 50),
  -    ?assertEqual({200, "OK"}, status(SecondResponse)),
  -    ?assertEqual(<<?DEFAULT_STRING>>, body(SecondResponse)).
  +%% This test appear to be designed to test the ConnTimeout.  For it to
  +%% work, we need to be able to update the connection timeout of an
  +%% existing lhttpc_lb worker, and to find the number of existing
  +%% connections.
  +%% connection_timeout() ->
  +%%     Port = start(gen_tcp, [fun simple_response/5, fun simple_response/5]),
  +%%     URL = url(Port, "/close_conn"),
  +%%     lhttpc_manager:update_connection_timeout(50), % very short keep alive
  +%%     {ok, Response} = lhttpc:request(URL, get, [], 100),
  +%%     ?assertEqual({200, "OK"}, status(Response)),
  +%%     ?assertEqual(<<?DEFAULT_STRING>>, body(Response)),
  +%%     timer:sleep(100),
  +%%     ?assertEqual(0,
  +%%         lhttpc_manager:connection_count({"localhost", Port, false})),
  +%%     lhttpc_manager:update_connection_timeout(300000). % set back
  +
  +%% suspended_manager() ->
  +%%     Port = start(gen_tcp, [fun simple_response/5, fun simple_response/5]),
  +%%     URL = url(Port, "/persistent"),
  +%%     {ok, FirstResponse} = lhttpc:request(URL, get, [], 50),
  +%%     ?assertEqual({200, "OK"}, status(FirstResponse)),
  +%%     ?assertEqual(<<?DEFAULT_STRING>>, body(FirstResponse)),
  +%%     Pid = whereis(lhttpc_manager),
  +%%     true = erlang:suspend_process(Pid),
  +%%     ?assertEqual({error, timeout}, lhttpc:request(URL, get, [], 50)),
  +%%     true = erlang:resume_process(Pid),
  +%%     ?assertEqual(1,
  +%%         lhttpc_manager:connection_count({"localhost", Port, false})),
  +%%     {ok, SecondResponse} = lhttpc:request(URL, get, [], 50),
  +%%     ?assertEqual({200, "OK"}, status(SecondResponse)),
  +%%     ?assertEqual(<<?DEFAULT_STRING>>, body(SecondResponse)).
   
   chunked_encoding() ->
       Port = start(gen_tcp, [fun chunked_response/5, fun chunked_response_t/5]),
  
positive.code:     ?assertEqual("2", lhttpc_lib:header_value("Trailer-2",
              headers(SecondResponse))).
  
  connection_count() ->
      timer:sleep(50), % give the TCP stack time to deliver messages
      ?assertEqual(0, lhttpc_manager:connection_count()).
  
  invalid_options() ->
      ?assertError({bad_options, [{foo, bar}, bad_option]},
  
negative.code:                 ?_test(partial_download_smallish_chunks()),
                  ?_test(partial_download_slow_chunks()),
                  ?_test(close_connection()),
                  ?_test(message_queue())
                  %% ?_test(connection_count()) % just check that it's 0 (last)
              ]}
      }.
  
  