Related to issue 38888: Failing SS Build
authorMartin Taal <martin.taal@openbravo.com>
Sat, 01 Dec 2018 18:27:13 +0100
changeset 7929 c7a8cdd5b633
parent 7928 6d89b465e0db
child 7930 fe9e033f09f5
Related to issue 38888: Failing SS Build
Explicitly pass in the server type from the test class
src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverUtils.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore2TerminalHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS001_SalesFlow.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS003_CreateMultiorder.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS004_Cashup.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS005_Cashmanagement.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS006_LAWa010_CreateLayaway.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS007_I31323_LayawayPayOpenTicket.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS008_RejectQuotations.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS009_MS020_ReturnServiceTests.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS010_I27476_SameDocumentNoAfterPayAndReload.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral001_SalesFlow.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral002_SaleWithTwentyLines.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral003_CreateMultiorder.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral004_Cashup.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral005_Cashmanagement.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral006_LAWa010_CreateLayaway.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral007_I31323_LayawayPayOpenTicket.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral008_RejectQuotations.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral009_MS020_ReturnServiceTests.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral010_I27476_SameDocumentNoAfterPayAndReload.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS001_SalesFlow.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS002_UpdateProduct.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS003_UpdateBPartner.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS004_Cashup.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS005_Cashmanagement.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS006_CMGa10_CashManagementDeposit.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS008_I30997_NewCustomerForReceipt.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS009_SaleAndCashupVerifyingDatabaseI.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS010_SaleAndCashupVerifyingDatabaseII.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS015_MPLSaleAndReturn.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS019_CreateMultiorder.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS022_RejectQuotations.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS023_I27476_SameDocumentNoAfterPayAndReload.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS025_NewDocumentnoAfterSale.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/VerifyServersSynchronization.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2001_SalesFlow.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2002_UpdateProduct.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2003_UpdateBPartner.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2004_Cashup.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2005_Cashmanagement.java
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverUtils.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverUtils.java	Sat Dec 01 18:27:13 2018 +0100
@@ -23,9 +23,7 @@
 import java.sql.SQLException;
 import java.util.ArrayList;
 
-import org.openbravo.test.mobile.core.junit.SequentialTestInfo;
 import org.openbravo.test.mobile.core.utils.ConfigurationProperties;
-import org.openbravo.test.mobile.core.utils.OBUtils;
 import org.openbravo.test.mobile.core.utils.OBWait;
 import org.openbravo.test.mobile.core.utils.TestLogger;
 import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperInsertUpdateOrDelete;
@@ -43,19 +41,12 @@
   private static final long waitMillis = Math.max(25000,
       (long) ((pushPeriodMillis + routePeriodMillis) * 1.2));
 
-  public static void waitForSynchronization() {
-    waitForSynchronization(SequentialTestInfo.getServerType());
-  }
-
-  public static void waitForCentralOutgoingSynced() {
-    waitForOutgoingSynced(waitMillis / 10, 10, ServerType.CENTRAL,
-        SequentialTestInfo.getServerType());
+  public static void waitForCentralOutgoingSynced(ServerType storeServerType) {
+    waitForOutgoingSynced(waitMillis / 10, 10, ServerType.CENTRAL, storeServerType);
   }
 
   public static void waitForSynchronization(final ServerType storeServerType) {
 
-    // initial pause
-    OBUtils.pause(4000);
     // wait for the store to sync
     waitForOutgoingSynced(waitMillis, 10, storeServerType, ServerType.CENTRAL);
     // wait for central to sync
@@ -150,7 +141,7 @@
         areEntriesProcessed.add(false);
 
         if (currentIteration > 2) {
-          MobileCoreAPI.requestProcessImportEntries();
+          MobileCoreAPI.requestProcessImportEntries(serverType);
         }
 
         final String sql = "SELECT COUNT(*) AS count FROM c_import_entry WHERE importstatus = 'Initial' or importstatus = 'Error'";
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java	Sat Dec 01 18:27:13 2018 +0100
@@ -52,13 +52,13 @@
    */
   public void goCentralOffline() {
     // waitForSynchronization to avoid issue 34530
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     MultiserverOfflineUtils.stopApacheForOffline();
 
     TestLogger.getLogger().info("Force transitioning to offline");
 
-    MultiserverUtils.waitForCentralOutgoingSynced();
+    MultiserverUtils.waitForCentralOutgoingSynced(getServerType());
 
     // switch between modes that forces request
     // works for high volume mode, but not for normal mode
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java	Sat Dec 01 18:27:13 2018 +0100
@@ -50,7 +50,7 @@
 
   @After
   public void after() {
-    MobileCoreAPI.requestProcessImportEntries();
+    MobileCoreAPI.requestProcessImportEntries(getServerType());
     MultiserverUtils.waitUntilImportEntriesHaveBeenProcessed(getServerType());
     super.after();
   }
@@ -70,7 +70,7 @@
     activateTerminals();
     setTerminalMode();
     super.preLoadActions();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
   }
 
   public ServerType getServerType() {
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore2TerminalHelper.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore2TerminalHelper.java	Sat Dec 01 18:27:13 2018 +0100
@@ -70,7 +70,7 @@
     activateTerminals();
     setTerminalMode();
     super.preLoadActions();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
   }
 
   public ServerType getServerType() {
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS001_SalesFlow.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS001_SalesFlow.java	Sat Dec 01 18:27:13 2018 +0100
@@ -57,7 +57,7 @@
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.CENTRAL);
 
     OBOfflineUtils.startApache();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.STORE1);
 
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS003_CreateMultiorder.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS003_CreateMultiorder.java	Sat Dec 01 18:27:13 2018 +0100
@@ -101,7 +101,7 @@
 
     OBOfflineUtils.startApache();
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyInDatabase(receiptNo1, receiptNo2, ServerType.STORE1);
 
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS004_Cashup.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS004_Cashup.java	Sat Dec 01 18:27:13 2018 +0100
@@ -46,7 +46,7 @@
     logger.info("cashupId1: " + cashupId1);
     WebPOSAPI.cleanCashup(this);
     // waitForSynchronization to avoid issue 34530
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     final String organizationId = BackboneHelper.getTerminalValue("organization");
     final String clientId = BackboneHelper.getTerminalValue("client");
@@ -86,7 +86,7 @@
     WebPOSDatabaseHelper.verifyCashupTaxes(cashupId, new OBNumber("19.07"), 0, ServerType.CENTRAL);
 
     OBOfflineUtils.startApache();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     // STORE
     WebPOSDatabaseHelper.verifyInvoice(documentNo1, new OBNumber(GROSS), ServerType.STORE1);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS005_Cashmanagement.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS005_Cashmanagement.java	Sat Dec 01 18:27:13 2018 +0100
@@ -79,7 +79,7 @@
 
     OBOfflineUtils.startApache();
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifytransactions(randomNumber, ServerType.STORE1);
 
     WebPOSDatabaseHelper.verifyProcessedImportEntries(importCount + 6);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS006_LAWa010_CreateLayaway.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS006_LAWa010_CreateLayaway.java	Sat Dec 01 18:27:13 2018 +0100
@@ -58,7 +58,7 @@
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.CENTRAL);
 
     OBOfflineUtils.startApache();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.STORE1);
   }
 }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS007_I31323_LayawayPayOpenTicket.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS007_I31323_LayawayPayOpenTicket.java	Sat Dec 01 18:27:13 2018 +0100
@@ -108,7 +108,7 @@
       WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo2, ServerType.CENTRAL);
 
       OBOfflineUtils.startApache();
-      MultiserverUtils.waitForSynchronization();
+      MultiserverUtils.waitForSynchronization(getServerType());
       WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo1, ServerType.STORE1);
       WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo2, ServerType.STORE1);
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS008_RejectQuotations.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS008_RejectQuotations.java	Sat Dec 01 18:27:13 2018 +0100
@@ -66,7 +66,7 @@
 
     // go offline
     OBOfflineUtils.stopApache();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     // reject quotation 1
     loadQuotation(documentNo1);
@@ -100,7 +100,7 @@
     // go online
     OBOfflineUtils.startApache();
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyRejected(documentNo2, "REJECT_2", ServerType.STORE1);
     verifyRejected(documentNo1, "REJECT_1", ServerType.STORE1);
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS009_MS020_ReturnServiceTests.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS009_MS020_ReturnServiceTests.java	Sat Dec 01 18:27:13 2018 +0100
@@ -120,7 +120,7 @@
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo2, ServerType.CENTRAL);
 
     OBOfflineUtils.startApache();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo1, ServerType.STORE1);
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo2, ServerType.STORE1);
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS010_I27476_SameDocumentNoAfterPayAndReload.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMS010_I27476_SameDocumentNoAfterPayAndReload.java	Sat Dec 01 18:27:13 2018 +0100
@@ -56,7 +56,7 @@
 
     OBOfflineUtils.startApache();
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral001_SalesFlow.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral001_SalesFlow.java	Sat Dec 01 18:27:13 2018 +0100
@@ -15,7 +15,7 @@
 
   @Test
   public void test() {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     goCentralOffline();
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral002_SaleWithTwentyLines.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral002_SaleWithTwentyLines.java	Sat Dec 01 18:27:13 2018 +0100
@@ -89,7 +89,7 @@
 
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.STORE1);
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral003_CreateMultiorder.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral003_CreateMultiorder.java	Sat Dec 01 18:27:13 2018 +0100
@@ -86,7 +86,7 @@
     WebPOSDatabaseHelper.verifyProcessedImportEntries(importCount + 2);
     verifyInDatabase(receiptNo1, receiptNo2, ServerType.STORE1);
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     verifyInDatabase(receiptNo1, receiptNo2, ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral004_Cashup.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral004_Cashup.java	Sat Dec 01 18:27:13 2018 +0100
@@ -25,7 +25,7 @@
     // starting cashup
     WebPOSAPI.cleanCashup(this);
     // waitForSynchronization to avoid issue 34530
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     final String organizationId = BackboneHelper.getTerminalValue("organization");
     final String clientId = BackboneHelper.getTerminalValue("client");
@@ -69,7 +69,7 @@
         ServerType.STORE1);
     WebPOSDatabaseHelper.verifyCashupTaxes(cashupId, new OBNumber("19.07"), 0, ServerType.STORE1);
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     // CENTRAL
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral005_Cashmanagement.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral005_Cashmanagement.java	Sat Dec 01 18:27:13 2018 +0100
@@ -38,7 +38,7 @@
     // the only one in the fin_finacc_transaction table
     final int randomNumber = random.nextInt(max - min) + min;
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     goCentralOffline();
 
     tap(TestIdPack.BUTTON_MENU);
@@ -58,7 +58,7 @@
     verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
     verifytransactions(randomNumber, ServerType.STORE1);
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     verifytransactions(randomNumber, ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral006_LAWa010_CreateLayaway.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral006_LAWa010_CreateLayaway.java	Sat Dec 01 18:27:13 2018 +0100
@@ -42,7 +42,7 @@
 
     getCOrderIdByDocumentNo(receiptNo, ServerType.STORE1);
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     getCOrderIdByDocumentNo(receiptNo, ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral007_I31323_LayawayPayOpenTicket.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral007_I31323_LayawayPayOpenTicket.java	Sat Dec 01 18:27:13 2018 +0100
@@ -96,7 +96,7 @@
       WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo1, ServerType.STORE1);
       WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo2, ServerType.STORE1);
 
-      MultiserverUtils.waitForSynchronization();
+      MultiserverUtils.waitForSynchronization(getServerType());
       MultiserverOfflineUtils.goCentralOnline();
 
       WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo1, ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral008_RejectQuotations.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral008_RejectQuotations.java	Sat Dec 01 18:27:13 2018 +0100
@@ -47,10 +47,10 @@
 
     // wait for synchronization to not have
     // transactions pending to sync
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     // go offline
     goCentralOffline();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     // fake single offline to prevent checks on message table
     SequentialTestInfo.setIsOffline();
@@ -85,7 +85,7 @@
       verifyRejected(documentNo2, "REJECT_2", ServerType.STORE1);
 
       // go online
-      MultiserverUtils.waitForSynchronization();
+      MultiserverUtils.waitForSynchronization(getServerType());
       MultiserverOfflineUtils.goCentralOnline();
 
       verifyRejected(documentNo2, "REJECT_2", ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral009_MS020_ReturnServiceTests.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral009_MS020_ReturnServiceTests.java	Sat Dec 01 18:27:13 2018 +0100
@@ -23,7 +23,7 @@
     // Initial steps: be sure there is enough cash for returns
     WebPOSAPI.cleanCashup(this);
     beSureThereIsMoney();
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     goCentralOffline();
 
     // Verify not returnable service error
@@ -102,7 +102,7 @@
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo1, ServerType.STORE1);
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo2, ServerType.STORE1);
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(documentNo1, ServerType.CENTRAL);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral010_I27476_SameDocumentNoAfterPayAndReload.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/offline/OfflineMSCentral010_I27476_SameDocumentNoAfterPayAndReload.java	Sat Dec 01 18:27:13 2018 +0100
@@ -36,7 +36,7 @@
     final String newDocumentno = String.format("%s/%07d", documentnoHeader[0], documentNumber);
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     MultiserverOfflineUtils.goCentralOnline();
 
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS001_SalesFlow.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS001_SalesFlow.java	Sat Dec 01 18:27:13 2018 +0100
@@ -54,7 +54,7 @@
     tap(TestIdMultiserver.BUTTON_PAY_DONE);
     verify(TestIdMultiserver.LABEL_TOTALTOPAY, "0.00");
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.STORE1);
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.CENTRAL);
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS002_UpdateProduct.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS002_UpdateProduct.java	Sat Dec 01 18:27:13 2018 +0100
@@ -40,7 +40,7 @@
 
   @Test
   public void test() {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     reload();
     WebPOSDatabaseHelper.getProductName(productName + "TEST", ServerType.STORE1);
     tap(TestIdMultiserver.BUTTON_SEARCH);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS003_UpdateBPartner.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS003_UpdateBPartner.java	Sat Dec 01 18:27:13 2018 +0100
@@ -41,7 +41,7 @@
 
   @Test
   public void test() {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     reload();
 
     WebPOSDatabaseHelper.getBPName(bpname + "TEST", ServerType.STORE1);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS004_Cashup.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS004_Cashup.java	Sat Dec 01 18:27:13 2018 +0100
@@ -62,7 +62,7 @@
     // final cashup
     finalCashup();
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     // STORE
     WebPOSDatabaseHelper.verifyInvoice(documentNo1, new OBNumber(GROSS), ServerType.STORE1);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS005_Cashmanagement.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS005_Cashmanagement.java	Sat Dec 01 18:27:13 2018 +0100
@@ -73,7 +73,7 @@
     tap(TestIdMultiserver.BUTTON_POPUP_OK);
     verify(TestIdMultiserver.LABEL_TOTALTOPAY, "0.00");
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifytransactions(randomNumber, ServerType.STORE1);
     verifytransactions(randomNumber, ServerType.CENTRAL);
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS006_CMGa10_CashManagementDeposit.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS006_CMGa10_CashManagementDeposit.java	Sat Dec 01 18:27:13 2018 +0100
@@ -124,7 +124,7 @@
   }
 
   public void verifyInDatabase(final int randomNumber) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     logger.info(String.format("verifyInDatabase, server type: ", ServerType.STORE1));
     verifyInDatabase(randomNumber, ServerType.STORE1);
     logger.info(String.format("verifyInDatabase, server type: ", ServerType.CENTRAL));
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS008_I30997_NewCustomerForReceipt.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS008_I30997_NewCustomerForReceipt.java	Sat Dec 01 18:27:13 2018 +0100
@@ -174,7 +174,7 @@
 
   public void verifyInDatabase(final String receiptNo, final String customerName,
       final String expectedBPName, final String addressName) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyInDatabase(receiptNo, customerName, expectedBPName, addressName, ServerType.STORE1);
     verifyInDatabase(receiptNo, customerName, expectedBPName, addressName, ServerType.CENTRAL);
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS009_SaleAndCashupVerifyingDatabaseI.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS009_SaleAndCashupVerifyingDatabaseI.java	Sat Dec 01 18:27:13 2018 +0100
@@ -84,7 +84,7 @@
 
   public void verifyInDatabase(final String documentNo1, final String organizationId,
       final String clientId, final String cashupId, final String businessPartnerId) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyInDatabase(documentNo1, organizationId, clientId, cashupId, businessPartnerId,
         ServerType.STORE1);
     verifyInDatabase(documentNo1, organizationId, clientId, cashupId, businessPartnerId,
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS010_SaleAndCashupVerifyingDatabaseII.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS010_SaleAndCashupVerifyingDatabaseII.java	Sat Dec 01 18:27:13 2018 +0100
@@ -85,7 +85,7 @@
 
   public void verifyInDatabase(final String organizationId, final String clientId,
       final String cashupId, final String businessPartnerId) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyInDatabase(organizationId, clientId, cashupId, businessPartnerId, ServerType.STORE1);
     verifyInDatabase(organizationId, clientId, cashupId, businessPartnerId, ServerType.CENTRAL);
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS015_MPLSaleAndReturn.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS015_MPLSaleAndReturn.java	Sat Dec 01 18:27:13 2018 +0100
@@ -118,7 +118,7 @@
   }
 
   public void verifyInDatabase(final String receiptNo) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyInDatabase(receiptNo, ServerType.STORE1);
     verifyInDatabase(receiptNo, ServerType.CENTRAL);
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS019_CreateMultiorder.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS019_CreateMultiorder.java	Sat Dec 01 18:27:13 2018 +0100
@@ -136,7 +136,7 @@
   }
 
   public void verifyInDatabase(final String receiptNo1, final String receiptNo2) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyInDatabase(receiptNo1, receiptNo2, ServerType.STORE1);
     verifyInDatabase(receiptNo1, receiptNo2, ServerType.CENTRAL);
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS022_RejectQuotations.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS022_RejectQuotations.java	Sat Dec 01 18:27:13 2018 +0100
@@ -120,7 +120,7 @@
   }
 
   protected void verifyRejected(final String documentNo, final String rejectReason) {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifyRejected(documentNo, rejectReason, ServerType.STORE1);
     verifyRejected(documentNo, rejectReason, ServerType.CENTRAL);
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS023_I27476_SameDocumentNoAfterPayAndReload.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS023_I27476_SameDocumentNoAfterPayAndReload.java	Sat Dec 01 18:27:13 2018 +0100
@@ -54,7 +54,7 @@
     final String newDocumentno = String.format("%s/%07d", documentnoHeader[0], documentNumber);
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS025_NewDocumentnoAfterSale.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS025_NewDocumentnoAfterSale.java	Sat Dec 01 18:27:13 2018 +0100
@@ -53,7 +53,7 @@
     final String newDocumentno = String.format("%s/%07d", documentnoHeader[0], documentNumber);
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     assertThat(BackboneHelper.getDocumentNo(), equalTo(newDocumentno));
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/VerifyServersSynchronization.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/VerifyServersSynchronization.java	Sat Dec 01 18:27:13 2018 +0100
@@ -8,7 +8,7 @@
 
   @Test
   public void test() {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
   }
 
 }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2001_SalesFlow.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2001_SalesFlow.java	Sat Dec 01 18:27:13 2018 +0100
@@ -54,7 +54,7 @@
     tap(TestIdMultiserver.BUTTON_PAY_DONE);
     verify(TestIdMultiserver.LABEL_TOTALTOPAY, "0.00");
     //
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.STORE2);
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.CENTRAL);
     WebPOSDatabaseHelper.getCOrderIdByDocumentNo(receiptNo, ServerType.STORE1, 0);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2002_UpdateProduct.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2002_UpdateProduct.java	Sat Dec 01 18:27:13 2018 +0100
@@ -40,7 +40,7 @@
 
   @Test
   public void test() {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     reload();
     WebPOSDatabaseHelper.getProductName(productName + "TEST", ServerType.STORE2);
     tap(TestIdMultiserver.BUTTON_SEARCH);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2003_UpdateBPartner.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2003_UpdateBPartner.java	Sat Dec 01 18:27:13 2018 +0100
@@ -40,7 +40,7 @@
 
   @Test
   public void test() {
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     reload();
 
     WebPOSDatabaseHelper.getBPName(bpname + "TEST", ServerType.STORE2);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2004_Cashup.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2004_Cashup.java	Sat Dec 01 18:27:13 2018 +0100
@@ -61,7 +61,7 @@
     // final cashup
     finalCashup();
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
 
     // STORE 2
     WebPOSDatabaseHelper.verifyInvoice(documentNo1, new OBNumber(GROSS), ServerType.STORE2);
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2005_Cashmanagement.java	Sat Dec 01 15:36:05 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store2/MSS2005_Cashmanagement.java	Sat Dec 01 18:27:13 2018 +0100
@@ -73,7 +73,7 @@
     tap(TestIdMultiserver.BUTTON_POPUP_OK);
     verify(TestIdMultiserver.LABEL_TOTALTOPAY, "0.00");
 
-    MultiserverUtils.waitForSynchronization();
+    MultiserverUtils.waitForSynchronization(getServerType());
     verifytransactions(randomNumber, ServerType.STORE2, 1);
     verifytransactions(randomNumber, ServerType.CENTRAL, 1);
     verifytransactions(randomNumber, ServerType.STORE1, 0);