Skip to content

Conversation

@iilyak
Copy link
Contributor

@iilyak iilyak commented Aug 19, 2019

Overview

There were couple of hacks in test/elixir/lib/couch.ex
We've got changes needed to remove them into httpotion 3.1.3.
The changes were introduced in:

This PR updates httpotion to 3.1.3 and removes the hacks from couch.ex

Testing recommendations

  1. Make sure tests pass make elixir
  2. Make sure we set timeouts in calls to ibrowse
    2.1. Start iex iex -S mix
    2.2. Make sure calls to ibrowse have .....{inactivity_timeout,55000}], 60000)
# Start the default trace message receiver
:dbg.tracer()
# Setup call (c) tracing on current process
:dbg.p(:erlang.pid_to_list(self()), :c)
# Setup an exception return trace (x) on ibrowse:send_req
:dbg.tp(:ibrowse, :send_req, :x)
Couch.request!(:post, "http://google.com", [])

Related Issues or Pull Requests

PRs in httpotion:

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation

There were couple of hacks in test/elixir/lib/couch.ex
We've got changes needed to remove them into httpotion 3.1.3.
The changes were introduced in:
- valpackett/httpotion#118
- valpackett/httpotion#130
@nickva
Copy link
Contributor

nickva commented Aug 19, 2019

Are we still setting the proper httpotion/ibrowse timeouts, where does that happen:

    timeout =
      Keyword.get(
        options,
        :timeout,
        Application.get_env(:httpotion, :default_timeout, @request_timeout)
      )

    ib_options =
      Keyword.merge(
        Application.get_env(:httpotion, :default_ibrowse, []),
        Keyword.get(options, :ibrowse, [{:inactivity_timeout, @inactivity_timeout}])
      )

I had also noticed new unused tags warnings:

warning: module attribute @inactivity_timeout was set but never used
  test/elixir/lib/couch.ex:59
warning: module attribute @request_timeout was set but never used
  test/elixir/lib/couch.ex:58

This commits ports `couch.ex` related chages from
apache#2104 into the world where
we don't override `process_arguments/3`
@iilyak
Copy link
Contributor Author

iilyak commented Aug 19, 2019

@nickva I updated the PR and testing instructions

@iilyak iilyak merged commit 24e9013 into apache:master Aug 19, 2019
@iilyak iilyak deleted the update-httpotion branch August 19, 2019 19:40
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.

2 participants