-
Notifications
You must be signed in to change notification settings - Fork 41
setup shutdown hooks on ServiceLifecycle::startAndWait #69
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
Conversation
95d15fb
to
87d01c5
Compare
motivation: fix startAndWait to work as advertised changes: * extract shutdown setup to a func and call it from both start and startAndWait * add test * fix api doc * fixi jazzy xenial issue (fixes ci)
@@ -18,7 +18,7 @@ RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools | |||
|
|||
# ruby and jazzy for docs generation | |||
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev | |||
RUN gem install jazzy --no-ri --no-rdoc | |||
RUN if [ "${ubuntu_version}" != "xenial" ] ; then gem install jazzy --no-ri --no-rdoc ; fi |
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.
unrelated jazzy issue on ubuntu 16.04, but required for CI to pass
closes #68 |
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.
LGTM, thanks!
@@ -91,6 +91,55 @@ final class ServiceLifecycleTests: XCTestCase { | |||
XCTAssertEqual(item.state, .shutdown, "expected item to be shutdown") | |||
} | |||
|
|||
func testStartAndWaitShutdownWithSignal() { | |||
if ProcessInfo.processInfo.environment["SKIP_SIGNAL_TEST"].flatMap(Bool.init) ?? false { | |||
print("skipping testStartAndWaitShutdownWithSignal") |
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.
You might be able to use XCTSkipUnless
here.
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.
Late LGTM
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.
Late LGTM 👍
motivation: fix startAndWait to work as advertised
changes: