epugh commented on code in PR #124:
URL: https://github.com/apache/solr-sandbox/pull/124#discussion_r2398503510


##########
scripts/gatling/lib/solr.sh:
##########
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+function solr_checkout_source_in() {
+  if [[ -z $1 ]]; then
+    >&2 echo "Required argument 'location' was not provided"
+    return 1
+  fi
+
+  local location=$1
+  if [[ -d $location/solr ]]; then
+    # The checkout already exists I guess?
+    return 0
+  fi
+
+  pushd $location
+    git clone g...@github.com:apache/solr.git
+  popd
+}
+
+# Returns with an exit status indicating whether Solr is (or isn't)
+# running at the specified port.  Callers provide the port as a required
+# argument.  Assumes that the wording directory is positioned so that
+# 'bin/solr' can be invoked.
+#   Usage: solr_is_running 8983
+function solr_is_running() {
+  if [[ -z ${1:-} ]]; then
+    >&2 echo "Required argument 'port' was not provided"
+    return 1
+  fi
+
+  local port=$1
+  bin/solr assert --started "http://localhost:$port/solr";
+  return $?
+}
+
+function solr_kill_all() {
+  ps -ef | grep solr | grep java | awk {'print $2'} | xargs kill -9

Review Comment:
   ```suggestion
     ps -ef | grep solr | grep java | awk {'print $2'} | xargs -r kill -9
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to