Looking for some @rustlang help.
How can I spin up a bunch of web servers (e.g. an actix-web app) at the beginning of a test, run the test logic and then shut down the server when the test ends?
I have tried using `spawn`, but no clean up takes place until the whole test suites completes. This is troublesome when the number of test grows and some resources start misbehaving (too many open DB connections).
-
-
I considered using something like a supervisor from
@bastion_rs, but `with_exec` and the Actix web server don't like each other (trait bounds issues).Show this thread -
Could I make it happen with a thread and a channel? How do I send the "shutdown" command?
Show this thread -
This would be extremely useful to run servers for HTTP-mocking 3rd party APIs that my application under test is interesting with (for black box testing).
Show this thread
End of conversation
New conversation -
-
-
Sorry, didn't see this...
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Writing about stuff to learn how it works, mostly in Rust.
Lead Engineer at