1

I have a situation where I want two servers to talk to each other in a test. As in Server A is triggered and then sends a message to Server B.

I can send requests to both Server A and B individually, but when I try to get Server A to talk to B at 0.0.0.0:[port] I get ConnectionRefused, message: "Connection refused"

edit I wrote out an example

https://github.com/JesseAbram/rocket_testing_issue

1 Answers1

1

The Rocket Client used for testing uses a function called launch_local() which starts the server without binding to any listening addresses. So instead of using that, I spun up servers as normal in separate threads so they were not blocking, and then used reqwest to talk to them.

kmdreko
  • 42,554
  • 6
  • 57
  • 106