Related to issue 38888: Failing SS Build
authorMartin Taal <martin.taal@openbravo.com>
Sat, 01 Dec 2018 18:27:51 +0100
changeset 7930 fe9e033f09f5
parent 7929 c7a8cdd5b633
child 7931 54339aff8196
Related to issue 38888: Failing SS Build
Request for process import entry for specific servertype
src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/SynchronizationMonitor.java
src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java
src-test/org/openbravo/test/mobile/retail/pack/database/WebPOSDatabaseHelper.java
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java	Sat Dec 01 18:27:13 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java	Sat Dec 01 18:27:51 2018 +0100
@@ -305,11 +305,9 @@
     SeleniumHelper.executeScript(unHook);
   }
 
-  public static void requestProcessImportEntries() {
+  public static void requestProcessImportEntries(ServerType serverType) {
     // only do this check for store or store2
-    if (!SequentialTestInfo.getServerType().equals(ServerType.STORE1)
-        &&
-        !SequentialTestInfo.getServerType().equals(ServerType.STORE2)) {
+    if (!serverType.equals(ServerType.STORE1) && !serverType.equals(ServerType.STORE2)) {
       return;
     }
 
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/SynchronizationMonitor.java	Sat Dec 01 18:27:13 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/SynchronizationMonitor.java	Sat Dec 01 18:27:51 2018 +0100
@@ -155,7 +155,7 @@
         areEntriesProcessed.add(false);
 
         if (currentIteration > 2) {
-          MobileCoreAPI.requestProcessImportEntries();
+          MobileCoreAPI.requestProcessImportEntries(server);
         }
 
         new DatabaseHelperSelect() {
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java	Sat Dec 01 18:27:13 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java	Sat Dec 01 18:27:51 2018 +0100
@@ -124,7 +124,7 @@
 
   public MobileCoreTerminalHelper(final String path, final String terminal, final String username,
       final String password, final ServerType serverType) {
-    this(path, terminal, username, password, serverType, true, true);
+    this(path, terminal, username, password, ServerType.SINGLESERVER, true, true);
   }
 
   /**
--- a/src-test/org/openbravo/test/mobile/retail/pack/database/WebPOSDatabaseHelper.java	Sat Dec 01 18:27:13 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/pack/database/WebPOSDatabaseHelper.java	Sat Dec 01 18:27:51 2018 +0100
@@ -227,7 +227,7 @@
     while (countImportEntries("Initial", server) > 0) {
       OBUtils.pause(1000);
       cnt++;
-      MobileCoreAPI.requestProcessImportEntries();
+      MobileCoreAPI.requestProcessImportEntries(server);
       if (cnt > 10) {
         throw new IllegalStateException(
             "Waiting too long for initial import entries to get processed");