Skip to content

Commit

Permalink
SOLR-16956: fix not being able to stop a solr by port number (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh authored Sep 5, 2023
1 parent 931de51 commit 0eef652
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
13 changes: 13 additions & 0 deletions solr/packaging/test/test_start_solr.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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

}

0 comments on commit 0eef652

Please sign in to comment.