Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2016-03-23 18:31:28 -0400
committerAndrew M. Finkbeiner2016-10-06 21:11:14 -0400
commitafc67f0d6a190ee9a072da21ca38dd26e6df0816 (patch)
treee55ae49f4ba2131f023dd6d4982e94c7eee13439
parent68809847b5789101f3ee2aecc0779e23a59804da (diff)
downloadorg.eclipse.osee-afc67f0d6a190ee9a072da21ca38dd26e6df0816.tar.gz
org.eclipse.osee-afc67f0d6a190ee9a072da21ca38dd26e6df0816.tar.xz
org.eclipse.osee-afc67f0d6a190ee9a072da21ca38dd26e6df0816.zip
bug[ats_ATS276864]: Problems aborting scripts in OTE
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java10
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/TestRunThread.java28
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java11
3 files changed, 24 insertions, 25 deletions
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java
index 550d2a777e..ee73362815 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java
@@ -276,22 +276,20 @@ public class OTETestEnvironmentClient {
@Override
public boolean cancelAll(boolean mayInterruptIfRunning) {
- BooleanResponse booleanResponse = new BooleanResponse();
RunTestsCancel cancel = new RunTestsCancel();
cancel.CANCEL_ALL.setValue(true);
cancel.GUID.setValue(guid);
- booleanResponse = sendit.synchSendAndResponse(booleanResponse, cancel, 20000);
- return booleanResponse.VALUE.getValue();
+ sendit.asynchSend(cancel);
+ return true;
}
@Override
public boolean cancelSingle(boolean mayInterruptIfRunning) {
- BooleanResponse booleanResponse = new BooleanResponse();
RunTestsCancel cancel = new RunTestsCancel();
cancel.CANCEL_ALL.setValue(false);
cancel.GUID.setValue(guid);
- booleanResponse = sendit.synchSendAndResponse(booleanResponse, cancel, 20000);
- return booleanResponse.VALUE.getValue();
+ sendit.asynchSend(cancel);
+ return true;
}
@Override
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/TestRunThread.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/TestRunThread.java
index bafcc7adb6..a0a1e754ac 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/TestRunThread.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/TestRunThread.java
@@ -126,21 +126,21 @@ public class TestRunThread extends OseeTestThread {
throw new TestException("", Level.SEVERE);
}
if(OtePropertiesCore.abortMultipleInterrupt.getBooleanValue()){
- int count = 0;
- do{
- this.interrupt();
- try{
- this.join(10);
- } catch (InterruptedException ex){
- }
- count++;
- } while (this.isAlive() && count < 200);
+ this.interrupt();
+ try{
+ this.join(1000*60);
+ } catch (InterruptedException ex){
+ }
} else {
- this.interrupt();
- try{
- this.join(1000*60);
- } catch (InterruptedException ex){
- }
+ int count = 0;
+ do{
+ this.interrupt();
+ try{
+ this.join(10);
+ } catch (InterruptedException ex){
+ }
+ count++;
+ } while (this.isAlive() && count < 200);
}
if (this.isAlive()) {
OseeLog.reportStatus(new BaseStatus(TestEnvironment.class.getName(), Level.SEVERE,
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java
index fc5ba7d2da..c44859f9a9 100644
--- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java
+++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java
@@ -53,7 +53,8 @@ import org.eclipse.swt.widgets.ToolItem;
public abstract class ScriptPage extends TestManagerPage {
private static final String NOT_CONNECTED = "<< NOT_CONNECTED >>";
-
+ private static final int ABORT_BTN_TIMER = 5000;
+
public enum UpdateableLabel {
HOSTLABEL,
CONFIGPATHLABEL;
@@ -247,7 +248,7 @@ public abstract class ScriptPage extends TestManagerPage {
abortBatchButton.setEnabled(false);
abortButton.setEnabled(false);
Timer timer = new Timer();
- timer.schedule(new EnabledAbortsTimer(), 30000);
+ timer.schedule(new EnabledAbortsTimer(), ABORT_BTN_TIMER);
}
});
abortButton.addListener(SWT.MouseUp, new Listener() {
@@ -258,7 +259,7 @@ public abstract class ScriptPage extends TestManagerPage {
abortBatchButton.setEnabled(false);
abortButton.setEnabled(false);
Timer timer = new Timer();
- timer.schedule(new EnabledAbortsTimer(), 30000);
+ timer.schedule(new EnabledAbortsTimer(), ABORT_BTN_TIMER);
}
}
});
@@ -275,7 +276,7 @@ public abstract class ScriptPage extends TestManagerPage {
abortBatchButton.setEnabled(false);
abortButton.setEnabled(false);
Timer timer = new Timer();
- timer.schedule(new EnabledAbortsTimer(), 30000);
+ timer.schedule(new EnabledAbortsTimer(), ABORT_BTN_TIMER);
}
});
abortBatchButton.addListener(SWT.MouseUp, new Listener() {
@@ -286,7 +287,7 @@ public abstract class ScriptPage extends TestManagerPage {
abortBatchButton.setEnabled(false);
abortButton.setEnabled(false);
Timer timer = new Timer();
- timer.schedule(new EnabledAbortsTimer(), 30000);
+ timer.schedule(new EnabledAbortsTimer(), ABORT_BTN_TIMER);
}
}
});

Back to the top