Related to issue 38888: Failing SS Build
authorMartin Taal <martin.taal@openbravo.com>
Sat, 01 Dec 2018 15:36:05 +0100
changeset 7928 6d89b465e0db
parent 7927 7d7e8222f943
child 7929 c7a8cdd5b633
Related to issue 38888: Failing SS Build
Ask for processing of import entries when the wait for the auto process is too long
src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverUtils.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverUtils.java	Sat Dec 01 15:35:33 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverUtils.java	Sat Dec 01 15:36:05 2018 +0100
@@ -31,6 +31,7 @@
 import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperInsertUpdateOrDelete;
 import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperQuery;
 import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperSelect;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.MobileCoreAPI;
 import org.openbravo.test.mobile.retail.pack.database.ServerType;
 import org.openqa.selenium.TimeoutException;
 
@@ -148,6 +149,10 @@
         final ArrayList<Boolean> areEntriesProcessed = new ArrayList<Boolean>();
         areEntriesProcessed.add(false);
 
+        if (currentIteration > 2) {
+          MobileCoreAPI.requestProcessImportEntries();
+        }
+
         final String sql = "SELECT COUNT(*) AS count FROM c_import_entry WHERE importstatus = 'Initial' or importstatus = 'Error'";
         new DatabaseHelperSelect() {
           @Override
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java	Sat Dec 01 15:35:33 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java	Sat Dec 01 15:36:05 2018 +0100
@@ -50,8 +50,8 @@
 
   @After
   public void after() {
+    MobileCoreAPI.requestProcessImportEntries();
     MultiserverUtils.waitUntilImportEntriesHaveBeenProcessed(getServerType());
-    MultiserverUtils.waitUntilImportEntriesHaveBeenProcessed(ServerType.CENTRAL);
     super.after();
   }