From 48e5c8f212b9b80e4690c146ef35d92044d3c2f8 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Fri, 1 Sep 2023 06:43:57 -0400 Subject: [PATCH 1/2] fix not being able to stop a solr by port number --- solr/bin/solr | 1 + solr/packaging/test/test_start_solr.bats | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/solr/bin/solr b/solr/bin/solr index 8a6d0560757..bad922d95c4 100644 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -1301,6 +1301,7 @@ if [ $# -gt 0 ]; then exit 1 fi SOLR_PORT="$2" + PROVIDED_SOLR_PORT=SOLR_PORT PASS_TO_RUN_EXAMPLE+=("-p" "$SOLR_PORT") shift 2 ;; diff --git a/solr/packaging/test/test_start_solr.bats b/solr/packaging/test/test_start_solr.bats index e0d7e5d981e..3b664759da4 100644 --- a/solr/packaging/test/test_start_solr.bats +++ b/solr/packaging/test/test_start_solr.bats @@ -36,3 +36,16 @@ teardown() { run bash -c 'solr stop -all 2>&1' refute_output --partial 'forcefully killing' } + +@test "stop command for single port" { + + solr start + solr start -p 7574 + solr assert --started http://localhost:8983/solr --timeout 5000 + solr assert --started http://localhost:7574/solr --timeout 5000 + + run solr stop -p 7574 + solr assert --not-started http://localhost:7574/solr --timeout 5000 + solr assert --started http://localhost:8983/solr --timeout 5000 + +} From b34c4c343be33ea65ce51092e0562b9ca82713ea Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Sat, 2 Sep 2023 08:09:56 -0400 Subject: [PATCH 2/2] Update solr/bin/solr Co-authored-by: Christine Poerschke --- solr/bin/solr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/bin/solr b/solr/bin/solr index bad922d95c4..e11eec4e8d4 100644 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -1301,7 +1301,7 @@ if [ $# -gt 0 ]; then exit 1 fi SOLR_PORT="$2" - PROVIDED_SOLR_PORT=SOLR_PORT + PROVIDED_SOLR_PORT="${SOLR_PORT}" PASS_TO_RUN_EXAMPLE+=("-p" "$SOLR_PORT") shift 2 ;;