This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 1249576d1 BIGTOP-3937: Executing smoke tests of Solr repeatedly would
be failed (#1108)
1249576d1 is described below
commit 1249576d16e00c528c21155f1ca339b27a6ef175
Author: guluo <[email protected]>
AuthorDate: Tue Oct 10 18:03:56 2023 +0800
BIGTOP-3937: Executing smoke tests of Solr repeatedly would be failed
(#1108)
---
bigtop-tests/smoke-tests/solr/build.gradle | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/bigtop-tests/smoke-tests/solr/build.gradle
b/bigtop-tests/smoke-tests/solr/build.gradle
index 89d851db9..601013d6f 100644
--- a/bigtop-tests/smoke-tests/solr/build.gradle
+++ b/bigtop-tests/smoke-tests/solr/build.gradle
@@ -35,6 +35,26 @@ def create_collection() {
}
}
+def delete_collection() {
+ exec {
+ executable "/usr/bin/solrctl"
+ args "collection", "--delete", "smoke"
+ }
+ exec {
+ executable "/usr/bin/solrctl"
+ args "instancedir", "--delete", "smoke"
+ }
+}
+
+def clean() {
+ if (file("/tmp/smoke_data").exists()) {
+ exec {
+ executable "/usr/bin/rm"
+ args "-rf", "/tmp/smoke_data"
+ }
+ }
+}
+
def junitVersion = '4.11'
dependencies {
compile group: 'junit', name: 'junit', version: junitVersion, transitive:
'true'
@@ -56,6 +76,11 @@ test.doFirst {
create_collection()
}
+test.doLast {
+ delete_collection()
+ clean()
+}
+
test {
include '**/Test*'
systemProperty "org.apache.bigtop.itest.solr_url",
"http://localhost:8983/solr/smoke"