Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
windoze authored and Chen Xu committed Aug 27, 2015
1 parent c021624 commit 2892934
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions test/test_http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,25 @@ void the_client() {

void the_url_client() {
url_client uc;
if(0)
{
client::response &resp=uc.request("http://0d0a.com/");
assert(resp.status_code==http_status_code::OK);
}
if(0)
{
client::response &resp=uc.request("http://www.baidu.com/");
assert(resp.status_code==http_status_code::OK);
}
{
// http://www.taobao.com/ responses with 302, redirects to 'https://www.taobao.com/'
client::response &resp=uc.request("http://www.taobao.com/");
// http://http://www.wikipedia.org// responses with 302, redirects to 'https://http://www.wikipedia.org//'
client::response &resp=uc.request("http://http://www.wikipedia.org//");
assert(resp.status_code==http_status_code::OK);
}
}

int fibio::main(int argc, char *argv[]) {
fiber_group fibers;
for (int i=0; i<1; i++) {
//fibers.create_fiber(the_client);
fibers.create_fiber(the_client);
fibers.create_fiber(the_url_client);
}
fibers.join_all();
Expand Down
2 changes: 0 additions & 2 deletions test/test_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ void rparent() {
}

int fibio::main(int argc, char *argv[]) {
this_fiber::get_scheduler().add_worker_thread(3);

fiber_group fibers;
fibers.create_fiber(parent);
fibers.create_fiber(rparent);
Expand Down

0 comments on commit 2892934

Please sign in to comment.