summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/helper
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/helper')
-rw-r--r--qadevOOo/runner/helper/LoggingThread.java13
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java19
-rw-r--r--qadevOOo/runner/helper/OfficeWatcher.java11
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java17
-rw-r--r--qadevOOo/runner/helper/UnoProvider.java5
5 files changed, 13 insertions, 52 deletions
diff --git a/qadevOOo/runner/helper/LoggingThread.java b/qadevOOo/runner/helper/LoggingThread.java
index 590a467a7134..6878fbc8c708 100644
--- a/qadevOOo/runner/helper/LoggingThread.java
+++ b/qadevOOo/runner/helper/LoggingThread.java
@@ -70,14 +70,11 @@ public class LoggingThread extends Thread {
* finished the LoggingThread
*/
public void finish() {
- try {
- finished = true;
- synchronized (this) {
- notify();
- }
- if (debug) log.println("TimeOutLogger: " + utils.getDateTime() + " try to finish ");
- sleep(1000);
- } catch (InterruptedException ex) {
+ finished = true;
+ synchronized (this) {
+ notify();
}
+ if (debug) log.println("TimeOutLogger: " + utils.getDateTime() + " try to finish ");
+ util.utils.pause(1000);
}
}
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index 4496fec9d43f..19890e93edcb 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -262,13 +262,7 @@ public class OfficeProvider implements AppProvider
}
if (msf == null)
{
- try
- {
- Thread.sleep(500L * k);
- }
- catch (InterruptedException ex)
- {
- }
+ util.utils.pause(500 * k);
}
k++;
}
@@ -762,15 +756,8 @@ public class OfficeProvider implements AppProvider
{
System.out.println(utils.getDateTime() + "OfficeProvider:Owp: ping ");
ow.ping();
- try
- {
- System.out.println(utils.getDateTime() + "OfficeProvider:Owp: sleep ");
- OfficeWatcherPing.sleep(1000); // 5000
- }
- catch (InterruptedException ex)
- {
- ex.printStackTrace();
- }
+ System.out.println(utils.getDateTime() + "OfficeProvider:Owp: sleep ");
+ util.utils.pause(1000);
}
}
diff --git a/qadevOOo/runner/helper/OfficeWatcher.java b/qadevOOo/runner/helper/OfficeWatcher.java
index 60900c0052bd..241115e775bd 100644
--- a/qadevOOo/runner/helper/OfficeWatcher.java
+++ b/qadevOOo/runner/helper/OfficeWatcher.java
@@ -65,7 +65,7 @@ public class OfficeWatcher extends Thread implements share.Watcher {
while (!isDone) {
timeOut = params.getInt("TimeOut");
final int previous = StoredPing;
- shortWait(timeOut == 0 ? 30000 : timeOut);
+ util.utils.pause(timeOut == 0 ? 30000 : timeOut);
// a timeout with value 0 lets watcher not react.
if ((StoredPing == previous) && timeOut != 0) {
isDone = true;
@@ -95,17 +95,10 @@ public class OfficeWatcher extends Thread implements share.Watcher {
} else {
dbg("reaeched timeout but ProcessHandler is NULL");
}
- shortWait(timeOut == 0 ? 30000 : timeOut);
+ util.utils.pause(timeOut == 0 ? 30000 : timeOut);
dbg("finished");
}
- private void shortWait(int timeOut) {
- try {
- OfficeWatcher.sleep(timeOut);
- } catch (InterruptedException ie) {
- }
- }
-
private void dbg(String message) {
if (debug) {
System.out.println(utils.getDateTime() + "OfficeWatcher: " + message);
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 1be600d54993..10241a3b9410 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -329,13 +329,7 @@ public class ProcessHandler
{
m_aProcess.destroy();
- try
- {
- Thread.sleep(1000L * counter); // 5000
- }
- catch (InterruptedException e)
- {
- }
+ util.utils.pause(1000 * counter);
try
{
final int exit_Value = m_aProcess.exitValue();
@@ -664,14 +658,7 @@ public class ProcessHandler
while (m_nTimeoutInSec > 0)
{
m_nTimeoutInSec--;
- try
- {
- sleep(1000);
- }
- catch(InterruptedException e)
- {
- // interrupt flag is set back to 'not interrupted' :-(
- }
+ util.utils.pause(1000);
if (isInHoldOn())
{
break;
diff --git a/qadevOOo/runner/helper/UnoProvider.java b/qadevOOo/runner/helper/UnoProvider.java
index 78430d195bf3..d5d18c38fb72 100644
--- a/qadevOOo/runner/helper/UnoProvider.java
+++ b/qadevOOo/runner/helper/UnoProvider.java
@@ -70,10 +70,7 @@ public class UnoProvider implements AppProvider {
public boolean disposeManager(TestParameters param) {
param.remove("ServiceManager");
System.gc();
- try {
- Thread.sleep(1000);
- }
- catch(InterruptedException e) {}
+ util.utils.pause(1000);
return true;
}