janhoy commented on code in PR #3784:
URL: https://github.com/apache/solr/pull/3784#discussion_r2447791127


##########
solr/packaging/test/test_extraction.bats:
##########
@@ -32,79 +41,74 @@ teardown() {
 
 @test "using curl to extract a single pdf file" {
 
+  if [ -n "${DOCKER_UNAVAILABLE:-}" ]; then
+    echo "WARNING: Docker not available; bypassing test." >&3
+    return 0
+  fi
+
   # Disable security manager to allow extraction
   # This appears to be a bug.
   export SOLR_SECURITY_MANAGER_ENABLED=false
   solr start -Dsolr.modules=extraction
-  
-  
-  solr create -c gettingstarted -d _default
 
-  
-  curl -X POST -H 'Content-type:application/json' -d '{
-    "add-requesthandler": {
-      "name": "/update/extract",
-      "class": "solr.extraction.ExtractingRequestHandler",
-      "defaults":{ "lowernames": "true", "captureAttr":"true"}
-    }
-  }' "http://localhost:${SOLR_PORT}/solr/gettingstarted/config";
+  solr create -c gettingstarted -d _default
+  wait_for_collection gettingstarted 30
+  apply_extract_handler gettingstarted

Review Comment:
   Good points. I looked at bin/solr assert and it only asserts that a node is 
running as far I could see, not that a collection is ready (feature idea?)
   
   When I ran these tests withuot the wait_for_collection and without the 
`sleep 5` in apply_extract_handler, the test was not stable, getting all kinds 
of errors from the configset API.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to