Skip to content

Commit

Permalink
test: Enable http_client test
Browse files Browse the repository at this point in the history
Removed skip flag file to switch on the testing of the
http_client test. Enabled http_client test on OSX,
fixed missing of the python2 symlink. Removed the subtest
on '595 error return' from 'error' suite, due to it may
hang forever. To enable test on travis-ci reverted commit:

1d7285c ('Disable flaky http_client.test.lua')

Closes #4254
  • Loading branch information
avtikhon authored and kyukhin committed Jun 7, 2019
1 parent 598e3ad commit 33254bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .travis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_ubuntu: deps_ubuntu

deps_osx:
brew update
brew install openssl readline curl icu4c --force
brew install python2 openssl readline curl icu4c --force
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python
pip install -r test-run/requirements.txt

Expand All @@ -62,7 +62,7 @@ test_osx: deps_osx
ulimit -S -n 20480 || :
ulimit -n
make -j8
cd test && python test-run.py --force -j 1 unit/ app/ app-tap/ box/ box-tap/
cd test && ./test-run.py --force -j 1 unit/ app/ app-tap/ box/ box-tap/

coverage_ubuntu: deps_ubuntu
cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_GCOV=ON
Expand Down
7 changes: 0 additions & 7 deletions test/app-tap/http_client.skipcond

This file was deleted.

9 changes: 3 additions & 6 deletions test/app-tap/http_client.test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ local function test_post_and_get(test, url, opts)
end

local function test_errors(test)
test:plan(3)
test:plan(2)
local http = client:new()
local status, err = pcall(http.get, http, "htp://mail.ru")
test:ok(not status and string.find(json.encode(err),
Expand All @@ -271,7 +271,6 @@ local function test_errors(test)
"Unsupported protocol"),
"POST: exception on bad protocol")
local r = http:get("http://do_not_exist_8ffad33e0cb01e6a01a03d00089e71e5b2b7e9930dfcba.ru")
test:is(r.status, 595, "GET: response on bad url")
end

-- gh-3679 allow only headers can be converted to string
Expand Down Expand Up @@ -559,16 +558,14 @@ local function test_concurrent(test, url, opts)
end

function run_tests(test, sock_family, sock_addr)
test:plan(10)
test:plan(11)
local server, url, opts = start_server(test, sock_family, sock_addr)
test:test("http.client", test_http_client, url, opts)
test:test("http.client headers redefine", test_http_client_headers_redefine,
url, opts)
test:test("cancel and errinj", test_cancel_and_errinj, url .. 'long_query', opts)
test:test("basic http post/get", test_post_and_get, url, opts)
-- disabled, please make test local, the internet is not always available
-- and quick during a test, gh-4254
-- test:test("errors", test_errors)
test:test("errors", test_errors)
test:test("request_headers", test_request_headers, url, opts)
test:test("headers", test_headers, url, opts)
test:test("special methods", test_special_methods, url, opts)
Expand Down

0 comments on commit 33254bd

Please sign in to comment.