Factor out TestServer. (#98)

This creates a struct that encapsulates the test server setup, and adds
a shutdown method to clean up the thread when done.
This commit is contained in:
Jacob Hoffman-Andrews
2020-06-30 19:16:34 -07:00
committed by GitHub
parent dafdf6a718
commit b47f90e773
4 changed files with 76 additions and 99 deletions

View File

@@ -14,6 +14,7 @@ mod query_string;
mod range;
mod redirect;
mod simple;
mod testserver;
mod timeout;
type RequestHandler = dyn Fn(&Unit) -> Result<Stream, Error> + Send + 'static;