Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2013-02-12 08:07:55 +0000
committerMarkus Tiede2013-02-12 08:07:55 +0000
commit82f9fe60b138de8661b986478095a259ca4d8beb (patch)
treeb6f1a584a4290cd17e656ad722a9001889a30c59
parent620969929439f100d4dde5e03011539935b97a54 (diff)
downloadorg.eclipse.jubula.core-82f9fe60b138de8661b986478095a259ca4d8beb.tar.gz
org.eclipse.jubula.core-82f9fe60b138de8661b986478095a259ca4d8beb.tar.xz
org.eclipse.jubula.core-82f9fe60b138de8661b986478095a259ca4d8beb.zip
Non-sprint task - minor javadoc spelling fix + utility method usage + new constant for AUT connection timeout added.
-rw-r--r--org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/batch/ExecutionController.java12
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java23
2 files changed, 16 insertions, 19 deletions
diff --git a/org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/batch/ExecutionController.java b/org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/batch/ExecutionController.java
index b2a67f13d..73d945408 100644
--- a/org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/batch/ExecutionController.java
+++ b/org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/batch/ExecutionController.java
@@ -449,11 +449,7 @@ public class ExecutionController implements IAUTServerEventListener,
while (m_job.getActualTestSuite() != null
&& !m_stopProcessing) {
while (m_idle && !m_stopProcessing) {
- try {
- Thread.sleep(50);
- } catch (InterruptedException e) {
- // do nothing
- }
+ TimeUtil.delay(50);
}
if (m_job.getActualTestSuite() != null
&& !m_stopProcessing
@@ -612,11 +608,7 @@ public class ExecutionController implements IAUTServerEventListener,
autConf, m_job.getLanguage());
m_startedAutId = autToStart;
while (!asl.autStarted() && !asl.hasAutStartFailed()) {
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- // ignore
- }
+ TimeUtil.delay(500);
}
waitExternalTime();
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java
index a5ee000bd..ad4c52a0e 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java
@@ -49,15 +49,20 @@ import org.slf4j.LoggerFactory;
/**
* This class represents the connection to the AUTServer which controls the
- * aplication under test.
+ * application under test.
*
- * This class is implemeted as a singleton. The server configuration contains
- * detailied information, how this instance can be contacted.
+ * This class is implemented as a singleton. The server configuration contains
+ * detailed information, how this instance can be contacted.
*
* @author BREDEX GmbH
* @created 22.07.2004
*/
public class AUTConnection extends BaseConnection {
+ /**
+ * the timeout used for establishing a connection to a running AUT
+ */
+ public static final int CONNECT_TO_AUT_TIMEOUT = 10000;
+
/** the logger */
static final Logger LOG = LoggerFactory
.getLogger(AUTConnection.class);
@@ -79,7 +84,7 @@ public class AUTConnection extends BaseConnection {
*
* @throws ConnectionException
* containing a detailed message why the connection could not
- * initialised
+ * initialized
*/
private AUTConnection() throws ConnectionException {
super();
@@ -107,10 +112,10 @@ public class AUTConnection extends BaseConnection {
}
/**
- * handles the fatal errors occurs during initialisation
+ * handles the fatal errors occurs during initialization
*
* @param throwable
- * the occured exception
+ * the occurred exception
* @throws ConnectionException
* a ConnectionException containing a detailed message
*/
@@ -127,7 +132,7 @@ public class AUTConnection extends BaseConnection {
* Method to get the single instance of this class.
*
* @throws ConnectionException
- * if an error occurs during initialisation.
+ * if an error occurs during initialization.
* @return the instance of this Singleton
*/
public static synchronized AUTConnection getInstance()
@@ -203,11 +208,11 @@ public class AUTConnection extends BaseConnection {
ServerState.Disconnected);
return false;
}
- long timeout = 10000;
long startTime = System.currentTimeMillis();
while (!monitor.isCanceled() && !isConnected()
&& AutAgentConnection.getInstance().isConnected()
- && startTime + timeout > System.currentTimeMillis()) {
+ && startTime + CONNECT_TO_AUT_TIMEOUT
+ > System.currentTimeMillis()) {
TimeUtil.delay(200);
}
if (isConnected()) {

Back to the top