gRPC cannot assign requested address

Suppose you just run into this exception, saying that gRPC cannot assign requested address: TL;DR: most likely you opened too many connections, and you run out of ephemeral ports. Consider channel/stub reuse: https://mchesnavsky.tech/grpc-channel-stub-reuse. Details: first, we should distinguish between fixed ports, and ephemeral ports. Ephemeral ports are typically used by client devices initiating communication with […]

READ MORE

REST endpoint stub in Java

Making a REST server Let me remind you that earlier we talked about setting up a REST server for unit tests in JUnit. We will also be using the WireMock tool today. Information about adding WireMock to the project can be found in the previous article. Configuring server parameters For HTTP: For HTTPS: To use […]

READ MORE

REST endpoint stub in JUnit

Suppose you want to test method X. It requests data from a specific endpoint Y. In this article, we’ll talk about three things: how to start a REST server within a unit test; how to set up data transmission on Y; how to check the number of requests received on Y. For information on how […]

READ MORE