OkHttp MockWebServer fails to accept connections when restarted

前端 未结 2 1765
情深已故
情深已故 2021-02-20 17:00

I\'m using the OkHttp MockWebServer to mock my server responses for unit tests.

It works great for the first test, but on the 2nd test my client fails with:

2条回答
  •  礼貌的吻别
    2021-02-20 17:39

    Your second request is using the URL of the first MockWebServer instance. (Each instance has a distinct URL.)

提交回复
热议问题