Skip to content

Commit

Permalink
JPERF-188: Improve stopJira to wait for Jira process to shutdown inst…
Browse files Browse the repository at this point in the history
…ead of all Java processes on the node
  • Loading branch information
Konrad Marszalek authored and mzyromski-atlassian committed Feb 21, 2020
1 parent 15efbcd commit d110ba8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Dropping a requirement of a major version of a dependency is a new contract.
- Dial down the provisioning logging amount.
- Enrich the provisioning logging messages.
- Fix `UriJiraFormula` failing to download results due to zero nodes and zero threads.
- Improve `stopJira` to wait only for Jira process shutdown instead of all Java processes

[JPERF-595]: https://ecosystem.atlassian.net/browse/JPERF-595

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ class CustomDatasetSource(

private fun stopJira(host: SshHost) {
val shutdownTomcat = "echo SHUTDOWN | nc localhost 8005"
val waitForNoJavaProcess = "while ps -C java -o pid=; do sleep 5; done"
Ssh(host, connectivityPatience = 4).newConnection().use { it.safeExecute("$shutdownTomcat && $waitForNoJavaProcess", Duration.ofMinutes(3)) }
val waitForNoJiraProcess = "while pgrep -f jira; do sleep 5; done"
Ssh(host, connectivityPatience = 4).newConnection().use {
it.safeExecute("$shutdownTomcat && $waitForNoJiraProcess", Duration.ofMinutes(3))
}
}

private fun stopDockerContainers(host: SshHost) {
Expand Down

0 comments on commit d110ba8

Please sign in to comment.