iilyak commented on pull request #3127:
URL: https://github.com/apache/couchdb/pull/3127#issuecomment-688869483


   In regards to `Move error reporting test to EUnit` commit you've mentioned: 
   
   > This test doesn't fail correctly any longer. Rather than attempting to
   create a new pathological view case I've just moved it to eunit where we can 
use meck to throw errors directly.
   
   The meck can be used from ExUnit. 
   ```
     defp with_fdb_error(_ctx) do
       :ok = :meck.new(:couch_views_batch, [:passthrough])
       :meck.expect(:couch_views_batch, :start, [], fn() ->
         :erlang.error({:erlfdb_error, 2101})
       end)
       on_exit(fn ->
         :meck.unload()
       end)
     end
   
   describe "something something" do
       setup [....,  :with_fdb_error]
       test "something something", ctx do
          ...
       end
   end
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to