Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ssl:handshake/2 in test server on Erlang 21+ versions #172

Conversation

nickva
Copy link
Contributor

@nickva nickva commented May 7, 2021

ssl:ssl_acceppt is deprecated.

We use the OTP_RELEASE define which exists on OTP 21+ only.

`ssl:ssl_acceppt` is deprecated. We use the `OTP_RELEASE` define which exists
on OTP 21+ only.
@nickva
Copy link
Contributor Author

nickva commented May 7, 2021

Tested with:

% asdf shell erlang 20.3.8.26
% rebar eunit
...
======================== EUnit ========================
module 'ibrowse_test'
module 'ibrowse'
  module 'ibrowse_tests'
    ibrowse_tests: running_server_fixture_test_ (Simple request can be honored)...[0.334 s] ok
    ibrowse_tests: running_server_fixture_test_ (Slow server causes timeout)...[5.001 s] ok
    ibrowse_tests: running_server_fixture_test_ (Pipeline depth goes down with responses)...[2.001 s] ok
    ibrowse_tests: running_server_fixture_test_ (Pipelines refill)...[4.002 s] ok
    ibrowse_tests: running_server_fixture_test_ (Timeout closes pipe)...[7.002 s] ok
    ibrowse_tests: running_server_fixture_test_ (Requests are balanced over connections)...[2.002 s] ok
    ibrowse_tests: running_server_fixture_test_ (Pipeline too small signals retries)...[2.007 s] ok
    ibrowse_tests: running_server_fixture_test_ (Dest status can be gathered)...[2.002 s] ok
    [done in 40.438 s]
  [done in 40.438 s]
module 'ibrowse_socks_server'
module 'ibrowse_http_client'
module 'ibrowse_app'
module 'ibrowse_sup'
module 'ibrowse_lb'
module 'ibrowse_load_test'
module 'ibrowse_lib'
  ibrowse_lib_tests: parse_urls_test_ (module 'ibrowse_lib_tests')...ok
  [done in 0.003 s]
module 'ibrowse_socks5'
module 'ibrowse_test_server'
=======================================================
  All 9 tests passed.

Then

% asdf shell erlang 23.3.2
 % rebar eunit
==> ibrowse (eunit)
...
======================== EUnit ========================
module 'ibrowse_test'
module 'ibrowse'
  module 'ibrowse_tests'
    ibrowse_tests: fun.simple_request (Simple request can be honored)...[0.019 s] ok
    ibrowse_tests: fun.slow_server_timeout (Slow server causes timeout)...[5.002 s] ok
    ibrowse_tests: fun.pipeline_depth (Pipeline depth goes down with responses)...[2.001 s] ok
    ibrowse_tests: fun.pipeline_refill (Pipelines refill)...[4.002 s] ok
    ibrowse_tests: fun.closing_pipes (Timeout closes pipe)...[7.002 s] ok
    ibrowse_tests: fun.balanced_connections (Requests are balanced over connections)...[2.001 s] ok
    ibrowse_tests: fun.small_pipeline (Pipeline too small signals retries)...[2.005 s] ok
    ibrowse_tests: fun.status (Dest status can be gathered)...[2.001 s] ok
    [done in 40.095 s]
  [done in 40.095 s]
module 'ibrowse_socks_server'
module 'ibrowse_http_client'
module 'ibrowse_app'
module 'ibrowse_sup'
module 'ibrowse_lb'
module 'ibrowse_load_test'
module 'ibrowse_lib'
  ibrowse_lib_tests: fun.parse_urls (module 'ibrowse_lib_tests')...ok
  [done in 0.003 s]
module 'ibrowse_socks5'
module 'ibrowse_test_server'
=======================================================
  All 9 tests passed.

@cmullaparthi cmullaparthi merged commit de04453 into cmullaparthi:master May 8, 2021
@nickva
Copy link
Contributor Author

nickva commented May 8, 2021

Thank you!

@nickva nickva deleted the make-eunit-tests-compile-on-erlang-23 branch May 8, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants