budaidev commented on code in PR #5082:
URL: https://github.com/apache/fineract/pull/5082#discussion_r2418521472


##########
integration-tests/build.gradle:
##########
@@ -88,15 +88,30 @@ cargo {
 
 cargoRunLocal.dependsOn ':fineract-war:war'
 cargoStartLocal.dependsOn ':fineract-war:war'
-cargoStartLocal.mustRunAfter 'testClasses'
 
-if (!project.hasProperty('cargoDisabled')) {
-    test {
-        dependsOn(cargoStartLocal)
+String waitForFineractTimeoutSeconds = 
project.findProperty('waitForFineractTimeoutSeconds') ?: '600'
+String waitForFineractCommand = "timeout ${waitForFineractTimeoutSeconds} bash 
-c 'until curl -k -s --fail 
\"https://localhost:8443/fineract-provider/actuator/health\"; > /dev/null; do 
sleep 5; echo \"Waiting for Fineract startup...\"; done'"
+
+tasks.register('waitForFineract') {
+    doLast {
+        exec {
+            commandLine 'bash', '-lc', waitForFineractCommand
+        }
+    }
+}

Review Comment:
   For integration tests we need to wait for the cargo instance to be start, if 
it is not included it will send the request before the service started. The 
Retrofit based client worked because it kept retrying



-- 
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]

Reply via email to