Coder Social home page Coder Social logo

Comments (13)

MSch avatar MSch commented on May 22, 2024

This is actually not intended, but we didn't run in any problems with our test cases so far. :/

I don't think it should be hard to make this work.

from bypass.

ericmj avatar ericmj commented on May 22, 2024

I've also had issues with concurrent requests, but couldn't figure out how to make a quick fix. Hope to find time next week to look into it more.

from bypass.

scrogson avatar scrogson commented on May 22, 2024

This looks like the same problem @MSch and I talked about a few months back. I believe it worked just fine in previous versions of bypass.

from bypass.

alco avatar alco commented on May 22, 2024

@MSch What's your take on implementing this functionality? I personally can't come up with a compelling use case. Bypass is primarily used for testing the correctness of the client requests and the handling of responses. What exactly would a Bypass handler that can be invoked concurrently help test?

from bypass.

ericmj avatar ericmj commented on May 22, 2024

It would be useful when your application code is making concurrent requests.

On Wednesday, 1 June 2016, Alexei Sholik [email protected] wrote:

@MSch https://github.com/MSch What's your take on implementing this
functionality? I personally can't come up with a compelling use case.
Bypass is primarily used for testing the correctness of the client requests
and the handling of responses. What exactly would a Bypass handler that can
be invoked concurrently help test?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AATV2u1lcGpOSnayv-qinKCfMevSzqg1ks5qHcIOgaJpZM4H8IPP
.

Eric Meadows-Jönsson

from bypass.

eidge avatar eidge commented on May 22, 2024

Same issue here.

I've got a client that makes concurrent requests to get paginated resources and it makes Bypass crash.

from bypass.

alco avatar alco commented on May 22, 2024

@eidge could you please provide the details of the crash? Which exact error are you getting?

from bypass.

eidge avatar eidge commented on May 22, 2024

Yup, backtrace:

15:27:33.207 [error] GenServer #PID<0.446.0> terminating
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Bypass.Instance.handle_cast/2
    (bypass) lib/bypass/instance.ex:75: anonymous fn(#PID<0.462.0>) in Bypass.Instance.handle_cast/2
    (elixir) lib/map.ex:513: Map.update!/3
    (bypass) lib/bypass/instance.ex:75: Bypass.Instance.handle_cast/2
    (stdlib) gen_server.erl:615: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:681: :gen_server.handle_msg/5
    (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

15:27:33.207 [error] #PID<0.463.0> running Bypass.Plug terminated
Server: localhost:35482 (http)
Request: GET /filter_gfs_1p00.pl?file=gfs.t00z.pgrb2.1p00.f003&lev_1000_mb=on&lev_100_mb=on&lev_150_mb=on&lev_200_mb=on&lev_250_mb=on&lev_300_mb=on&lev_350_mb=on&lev_400_mb=on&lev_4
50_mb=on&lev_500_mb=on&lev_550_mb=on&lev_600_mb=on&lev_650_mb=on&lev_700_mb=on&lev_750_mb=on&lev_800_mb=on&lev_850_mb=on&lev_900_mb=on&lev_925_mb=on&lev_950_mb=on&lev_975_mb=on&lev_
high_cloud_layer=on&lev_low_cloud_layer=on&lev_mean_sea_level=on&lev_middle_cloud_layer=on&lev_surface=on&var_CAPE=on&var_CIN=on&var_DPT=on&var_GUST=on&var_HGT=on&var_HPBL=on&var_PR
ES=on&var_PRMSL=on&var_RH=on&var_TCDC=on&var_TMP=on&var_UGRD=on&var_VGRD=on&lev_2_m_above_ground=on&leftlon=0&rightlon=360&toplat=90&bottomlat=-90&dir=%2Fgfs.2016063000
** (exit) exited in: GenServer.call(#PID<0.446.0>, :get_expect_fun, :infinity)
    ** (EXIT) no process

from bypass.

alco avatar alco commented on May 22, 2024

@eidge Thanks. I hope to find time to look into adding support for concurrent requests at some point.

from bypass.

bcat-eu avatar bcat-eu commented on May 22, 2024

Same here, works fine with one request but breaks on more (made with async TaskSupervisor). Here's the output:

15:56:37.154 [error] GenServer #PID<0.253.0> terminating ** (FunctionClauseError) no function clause matching in anonymous fn/1 in Bypass.Instance.handle_cast/2 (bypass) lib/bypass/instance.ex:75: anonymous fn(#PID<0.265.0>) in Bypass.Instance.handle_cast/2 (elixir) lib/map.ex:513: Map.update!/3 (bypass) lib/bypass/instance.ex:75: Bypass.Instance.handle_cast/2 (stdlib) gen_server.erl:601: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:667: :gen_server.handle_msg/5 (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3 15:56:37.154 [error] #PID<0.265.0> running Bypass.Plug terminated Server: localhost:40707 (http) Request: GET /ok/endpoint ** (exit) exited in: GenServer.call(#PID<0.253.0>, {:put_expect_result, :ok_call}, :infinity) ** (EXIT) no process 15:56:37.154 [error] #PID<0.264.0> running Bypass.Plug terminated Server: localhost:40707 (http) Request: GET /another/ok/endpoint ** (exit) exited in: GenServer.call(#PID<0.253.0>, {:put_expect_result, :ok_call}, :infinity) ** (EXIT) no process

from bypass.

cbarratt avatar cbarratt commented on May 22, 2024

I currently have the same issue too, it seems to be totally random as at least 60% of the time it works, then I tend to get random failures with the same message as above

from bypass.

alanvoss avatar alanvoss commented on May 22, 2024

We independently found this issue, as well, and would love to see it patched. PR submitted.

from bypass.

alanvoss avatar alanvoss commented on May 22, 2024

Adding #36 which fixes this issue properly.

from bypass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.