diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-22 10:27:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-13 08:42:55 +0200 |
commit | c55f945e4b092a7c972e6f64260ba98784c85a77 (patch) | |
tree | 2e83e6b8ebbe532e9217df8bfa80aa5e4634f168 | |
parent | b82cc80e8405086856a795a17e655cdcf85020fc (diff) |
java: move DEFAULT_SHORT_WAIT_MS to util.utils
so I can turn PopertyNames into an enum
Change-Id: I939a83c0962813302a3653e75976147b2300cb18
5 files changed, 14 insertions, 13 deletions
diff --git a/framework/qa/complex/framework/recovery/RecoveryTest.java b/framework/qa/complex/framework/recovery/RecoveryTest.java index 42f61c331fe2..6bf108ca36f3 100644 --- a/framework/qa/complex/framework/recovery/RecoveryTest.java +++ b/framework/qa/complex/framework/recovery/RecoveryTest.java @@ -221,7 +221,7 @@ public class RecoveryTest extends ComplexTestCase { log.println("wating for recovery dialog..."); int counter = 0; - int maximum = param.getInt(PropertyName.THREAD_TIME_OUT) / PropertyName.DEFAULT_SHORT_WAIT_MS; + int maximum = param.getInt(PropertyName.THREAD_TIME_OUT) / utils.DEFAULT_SHORT_WAIT_MS; XDialog oDialog = rt.getActiveDialog(xMSF); @@ -352,7 +352,7 @@ public class RecoveryTest extends ComplexTestCase { util.utils.shortWait(); int counter = 0; - int maximum = param.getInt(PropertyName.THREAD_TIME_OUT) / PropertyName.DEFAULT_SHORT_WAIT_MS; + int maximum = param.getInt(PropertyName.THREAD_TIME_OUT) / utils.DEFAULT_SHORT_WAIT_MS; XAccessibleContext oButton = null; while ((oButton == null) && (counter < maximum)){ diff --git a/framework/qa/complex/framework/recovery/RecoveryTools.java b/framework/qa/complex/framework/recovery/RecoveryTools.java index 70374518f6ce..b199bcecc5b6 100644 --- a/framework/qa/complex/framework/recovery/RecoveryTools.java +++ b/framework/qa/complex/framework/recovery/RecoveryTools.java @@ -93,7 +93,7 @@ public class RecoveryTools { // This could consumes more time then the TimeOut allow. int counter = 0; int multi = 5; - int pause = PropertyName.DEFAULT_SHORT_WAIT_MS * 10; + int pause = utils.DEFAULT_SHORT_WAIT_MS * 10; int timeOut = param.getInt(PropertyName.THREAD_TIME_OUT)*5; int maximum = (timeOut / pause) * multi; @@ -184,7 +184,7 @@ public class RecoveryTools { helper.ProcessHandler ph = (helper.ProcessHandler) param.get("AppProvider"); int timeOut = param.getInt(PropertyName.THREAD_TIME_OUT)*5; - int pause = PropertyName.DEFAULT_SHORT_WAIT_MS * 20; + int pause = utils.DEFAULT_SHORT_WAIT_MS * 20; int multi = 0; while ((ph != null) && (ph.getExitCode()<0) && (pause*multi < timeOut)) { log.println("waiting until the office is closed... remaining " + (timeOut - pause * multi)/1000 + " seconds"); @@ -257,7 +257,7 @@ public class RecoveryTools { { KlickButtonThread kbt = new KlickButtonThread(xWindow, buttonName); kbt.start(); - util.utils.pause(PropertyName.DEFAULT_SHORT_WAIT_MS * 10); + util.utils.pause(utils.DEFAULT_SHORT_WAIT_MS * 10); } public void copyRecoveryData(boolean backup) diff --git a/qadevOOo/runner/util/PropertyName.java b/qadevOOo/runner/util/PropertyName.java index 27e29b12f651..51d52a873750 100644 --- a/qadevOOo/runner/util/PropertyName.java +++ b/qadevOOo/runner/util/PropertyName.java @@ -63,10 +63,6 @@ public interface PropertyName { */ String OUT_PRODUCER = "OutProducer"; /** - * Default short wait time for the Office - */ - int DEFAULT_SHORT_WAIT_MS = 500; - /** * internal only, no parameter * The OfficeProvider contains the full qualified * class that provides a connection to StarOffice<br> diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java index 4557cb5484e5..4a77e41e2331 100644 --- a/qadevOOo/runner/util/utils.java +++ b/qadevOOo/runner/util/utils.java @@ -648,7 +648,7 @@ public class utils { * This is the default call, which waits for 500ms. */ public static void shortWait() { - pause(PropertyName.DEFAULT_SHORT_WAIT_MS); + pause(utils.DEFAULT_SHORT_WAIT_MS); } /** Causes the thread to sleep some time. @@ -857,4 +857,9 @@ public class utils { dfmt.format(cal.get(Calendar.MILLISECOND)); return "[" + dateTime + "]"; } + + /** + * Default short wait time for the Office + */ + public static final int DEFAULT_SHORT_WAIT_MS = 500; } diff --git a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java index 56dbf5369470..43bffcf83360 100644 --- a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java +++ b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java @@ -39,7 +39,7 @@ import java.awt.event.InputEvent; import lib.MultiMethodTest; import util.AccessibilityTools; -import util.PropertyName; +import util.utils; /** * Testing <code>com.sun.star.awt.XUserInputInterception</code> @@ -151,7 +151,7 @@ public class _XUserInputInterception extends MultiMethodTest { et.run(); - util.utils.pause(PropertyName.DEFAULT_SHORT_WAIT_MS * 2); + util.utils.pause(utils.DEFAULT_SHORT_WAIT_MS * 2); log.println("key listener thread should be finished."); @@ -214,7 +214,7 @@ public class _XUserInputInterception extends MultiMethodTest { et.run(); - util.utils.pause(PropertyName.DEFAULT_SHORT_WAIT_MS * 2); + util.utils.pause(utils.DEFAULT_SHORT_WAIT_MS * 2); log.println("mouse listener thread should be finished."); boolean bOK = m_mousePressed1 & m_mouseReleased1 & |