Skip to content

Commit

Permalink
solr@8.11: reduce test size
Browse files Browse the repository at this point in the history
This test is often failing. We already tried to fix it in Homebrew#156049

Found in Homebrew#156470

Looking at the analytics, I think this is the quickest solution:
install: 59 (30 days), 226 (90 days), 403 (365 days)
install-on-request: 59 (30 days), 226 (90 days), 403 (365 days)
build-error: 0 (30 days)
  • Loading branch information
iMichka committed Dec 7, 2023
1 parent 094a2e0 commit 0c3bcec
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Formula/s/solr@8.11.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,8 @@ def post_install
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]

ENV["SOLR_PID_DIR"] = testpath
port = free_port

# Info detects no Solr node => exit code 3
assert_match "No Solr nodes are running", shell_output("#{bin}/solr status", 3)
# Start a Solr node => exit code 0
shell_output("#{bin}/solr start -p #{port} -Djava.io.tmpdir=/tmp")
# Info detects a Solr node => exit code 0
sleep 10
assert_match "Found 1 Solr nodes", shell_output("#{bin}/solr status")
# Impossible to start a second Solr node on the same port => exit code 1
shell_output("#{bin}/solr start -p #{port}", 1)
# Stop a Solr node => exit code 0
# Exit code is 1 without init process in a docker container
shell_output("#{bin}/solr stop -p #{port}", (OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]) ? 1 : 0)
# No Solr node left to stop => exit code 1
shell_output("#{bin}/solr stop -p #{port}", 1)
end
end

0 comments on commit 0c3bcec

Please sign in to comment.