Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit ec6b969

Browse files
committed
Add awaitShutdown utils
1 parent f135e41 commit ec6b969

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ Own configuration keys can be access like `MicroserviceConfiguration.configurati
2222
### Set port to configured number
2323
Calling `configuredPort()` sets the port of the web server to the configured port number (`port` or `server.port` as of version 0.0.12).
2424

25+
### Wait until Spark is shut down
26+
Calling `awaitShutdown()` waits until Spark is shut down. This is especially useful in tests.
27+
2528
## Status endpoint
2629
Calling `status()` activates a status/health/diagnostics JSON object on `<HOST>/status/`.
2730
The JSON object looks like this as of version 0.0.12:

src/main/kotlin/de/debuglevel/microservices/utils/spark/SparkTestUtils.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ object SparkTestUtils {
2929
* Access the internals of Spark to check if the "initialized" flag is already set to false.
3030
*/
3131
private fun isSparkInitialized(): Boolean {
32-
3332
val sparkClass = Spark::class.java
3433
val getInstanceMethod = sparkClass.getDeclaredMethod("getInstance")
3534
getInstanceMethod.isAccessible = true

0 commit comments

Comments
 (0)