sergehuber commented on code in PR #715:
URL: https://github.com/apache/unomi/pull/715#discussion_r2426942596


##########
itests/src/test/java/org/apache/unomi/itests/BaseIT.java:
##########
@@ -164,10 +167,25 @@ public abstract class BaseIT extends KarafTestSupport {
     public void waitForStartup() throws InterruptedException {
         // disable retry
         retry = new KarafTestSupport.Retry(false);
+        searchEngine = System.getProperty(SEARCH_ENGINE_PROPERTY, 
SEARCH_ENGINE_ELASTICSEARCH);
 
         // Start Unomi if not already done
         if (!unomiStarted) {
-            executeCommand("unomi:start");
+            // We must check that the Unomi Management Service is up and 
running before launching the
+            // command otherwise the start configuration will not be properly 
populated.
+            waitForUnomiManagementService();
+            if (SEARCH_ENGINE_ELASTICSEARCH.equals(searchEngine)) {
+                LOGGER.info("Starting Unomi with elasticsearch search 
engine...");
+                System.out.println("==== Starting Unomi with elasticsearch 
search engine...");
+                executeCommand("unomi:start");
+            } else if (SEARCH_ENGINE_OPENSEARCH.equals(searchEngine)){
+                LOGGER.info("Starting Unomi with opensearch search engine...");
+                System.out.println("==== Starting Unomi with opensearch search 
engine...");
+                executeCommand("unomi:start " + SEARCH_ENGINE_OPENSEARCH);

Review Comment:
   As mentioned before, this is now a start configuration system that is quite 
generic and I think it makes more sense as it configured which features are 
started. It is also documented.



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