From 32427e7a3ff5a04f0e1c44e09cce78ca5fcba570 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Wed, 7 Feb 2024 13:22:08 +0100 Subject: [PATCH] Fix condition when stopping test servers It was broken for solr; the same condition is used for Redis as well, for consistency. --- project/RedisServer.scala | 3 ++- project/SolrServer.scala | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/project/RedisServer.scala b/project/RedisServer.scala index 223f646b..bc350c4f 100644 --- a/project/RedisServer.scala +++ b/project/RedisServer.scala @@ -82,7 +82,8 @@ class RedisServer(module: String, port: Int) { } def stop(): Unit = - if (!skipServer && wasStartedHere.get()) { + if (skipServer || !wasStartedHere.get()) () + else { println(s"Stopping Redis container for '$module'") stopCmd.!! () diff --git a/project/SolrServer.scala b/project/SolrServer.scala index 654c7565..aec613f9 100644 --- a/project/SolrServer.scala +++ b/project/SolrServer.scala @@ -100,7 +100,7 @@ class SolrServer(module: String, port: Int) { } def stop(): Unit = - if (!skipServer && !wasStartedHere.get()) () + if (skipServer || !wasStartedHere.get()) () else { println(s"Stopping Solr container for '$module'") stopCmd.!!