use of cbit.vcell.numericstest.TestCriteriaCrossRefOPResults.CrossRefData in project vcell by virtualcell.
the class TestingFrameworkWindowManager method updateReports.
private void updateReports(final Hashtable<TestSuiteInfoNew, Vector<TestCriteriaCrossRefOPResults.CrossRefData>> genReportHash) {
new Thread(new Runnable() {
public void run() {
Set<java.util.Map.Entry<TestSuiteInfoNew, Vector<TestCriteriaCrossRefOPResults.CrossRefData>>> tsInfoEntry = genReportHash.entrySet();
Iterator<java.util.Map.Entry<TestSuiteInfoNew, Vector<TestCriteriaCrossRefOPResults.CrossRefData>>> tsInfoIter = tsInfoEntry.iterator();
while (tsInfoIter.hasNext()) {
try {
Entry<TestSuiteInfoNew, Vector<TestCriteriaCrossRefOPResults.CrossRefData>> entry = tsInfoIter.next();
TestSuiteInfoNew tsInfo = entry.getKey();
Vector<TestCriteriaCrossRefOPResults.CrossRefData> xrefDataV = entry.getValue();
//
Vector<AsynchClientTask> tasksVLocal = new java.util.Vector<AsynchClientTask>();
tasksVLocal.add(new TFUpdateRunningStatus(TestingFrameworkWindowManager.this, tsInfo));
TestSuiteNew tsNew = getTestingFrameworkWindowPanel().getDocumentManager().getTestSuite(tsInfo.getTSKey());
for (int i = 0; i < xrefDataV.size(); i++) {
CrossRefData crossRefData = xrefDataV.elementAt(i);
boolean bDone = false;
for (int j = 0; j < tsNew.getTestCases().length; j++) {
TestCaseNew testCaseNew = tsNew.getTestCases()[j];
if (testCaseNew.getTCKey().equals(crossRefData.tcaseKey)) {
for (int k = 0; k < testCaseNew.getTestCriterias().length; k++) {
TestCriteriaNew testCriteria = testCaseNew.getTestCriterias()[k];
if (testCriteria.getTCritKey().equals(crossRefData.tcritKey)) {
tasksVLocal.add(new TFGenerateReport(TestingFrameworkWindowManager.this, testCaseNew, testCriteria, null));
bDone = true;
break;
}
}
}
if (bDone) {
break;
}
}
}
final String END_NOTIFIER = "END NOTIFIER";
tasksVLocal.add(new AsynchClientTask(END_NOTIFIER, AsynchClientTask.TASKTYPE_NONSWING_BLOCKING, false, false) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
hashTable.put(END_NOTIFIER, END_NOTIFIER);
}
});
tasksVLocal.add(new TFRefresh(TestingFrameworkWindowManager.this, tsInfo));
AsynchClientTask[] tasksArr = new AsynchClientTask[tasksVLocal.size()];
tasksVLocal.copyInto(tasksArr);
java.util.Hashtable<String, Object> hashLocal = new java.util.Hashtable<String, Object>();
ClientTaskDispatcher.dispatch(getTestingFrameworkWindowPanel(), hashLocal, tasksArr, true);
// Wait for each report to complete before going on to next because report methods are not thread safe?
while (!hashLocal.contains(END_NOTIFIER)) {
Thread.sleep(100);
}
} catch (Exception e) {
PopupGenerator.showErrorDialog(TestingFrameworkWindowManager.this, "Error updating reports\n" + e.getMessage());
return;
}
}
}
}).start();
}
Aggregations