-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support graceful shutdown in Netty server #3294
Changes from 1 commit
83a2e80
3b01dcf
7bc814f
e5ac16f
03dc2b8
04d71cb
a1a4855
d452001
5b61c6c
b8a4c2b
6341264
610e128
e74341a
f33b861
4b5cb55
f2eacdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,9 @@ trait CreateServerTest[F[_], +R, OPTIONS, ROUTE] { | |
runTest: (SttpBackend[IO, Fs2Streams[IO] with WebSockets], Uri) => IO[Assertion] | ||
): Test | ||
|
||
/** Override for a server to allow running tests which have access to a stop() effect, allowing shutting down the server within the test. | ||
* By default, this method just uses a no-op IO.unit. | ||
*/ | ||
def testServerWithStop(name: String, rs: => NonEmptyList[ROUTE], gracefulShutdownTimeout: Option[FiniteDuration])( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similarly here ... maybe we can reduce the number of variants here by just supporting the stop-variants, and the others would delegate here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these used in fact? :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah ok they are ... still seems we might have to many similar variants, making this hard to understand There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I didn't want to mess up other servers, so I thought to make the default implementation implement |
||
runTest: IO[Unit] => (SttpBackend[IO, Fs2Streams[IO] with WebSockets], Uri) => IO[Assertion] | ||
): Test = testServer(name, rs)(runTest(IO.unit)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should can? ;) maybe just run it through chatgpt to iron out the english :)