This is an automated email from the ASF dual-hosted git repository.
krisden pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 7fe2a5a3910 SOLR-16584: BATS test fails stopping two instances (#1240)
7fe2a5a3910 is described below
commit 7fe2a5a39103852e5f1c21ca3b99a2c8cb43bc12
Author: Kevin Risden <[email protected]>
AuthorDate: Thu Dec 15 18:15:29 2022 -0500
SOLR-16584: BATS test fails stopping two instances (#1240)
* Assert that Solr has started before shutting back down again
* capture logs on test failure
Co-authored-by: Jan Høydahl <[email protected]>
---
.github/workflows/bin-solr-test.yml | 47 ++++++++++++++++++++++++++++++++
solr/packaging/test/test_start_solr.bats | 2 ++
2 files changed, 49 insertions(+)
diff --git a/.github/workflows/bin-solr-test.yml
b/.github/workflows/bin-solr-test.yml
new file mode 100644
index 00000000000..6daadd1817e
--- /dev/null
+++ b/.github/workflows/bin-solr-test.yml
@@ -0,0 +1,47 @@
+name: Solr Script Tests
+
+on:
+ pull_request:
+ branches:
+ - 'main'
+ paths:
+ - '.github/workflows/bin-solr-test.yml'
+ - 'solr/bin/**'
+ - 'solr/packaging/**'
+
+jobs:
+ test:
+ name: Run Solr Script Tests
+
+ runs-on: ubuntu-latest
+
+ steps:
+ # Setup
+ - uses: actions/checkout@v2
+ - name: Set up JDK 11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: 11
+ java-package: jdk
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.gradle/caches
+ key: ${{ runner.os }}-gradle-binsolr-${{ hashFiles('versions.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-binsolr-
+ ${{ runner.os }}-gradle-
+ - name: Initialize gradle settings
+ run: ./gradlew localSettings
+ - name: Test the bin/solr script
+ run: ./gradlew integrationTests
+ - name: Archive logs
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v3
+ with:
+ name: logs
+ path: solr/packaging/build/test-output
+
diff --git a/solr/packaging/test/test_start_solr.bats
b/solr/packaging/test/test_start_solr.bats
index 68469063ff3..522324aabab 100644
--- a/solr/packaging/test/test_start_solr.bats
+++ b/solr/packaging/test/test_start_solr.bats
@@ -31,6 +31,8 @@ teardown() {
@test "SOLR11740 check f" {
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 bash -c 'solr stop -all 2>&1'
refute_output --partial 'forcefully killing'
}