コード例 #1
0
  /** Returns true if this VM has acquired the right to run this TestTask */
  private static DUnitRun getDUnitRun() {
    if (dunitRun != null) {
      System.out.println("BBB dunitRun not null returning");
      return dunitRun;
    }

    try {
      SwarmBB.getBB().getSharedLock().lock();
      Integer runId = (Integer) SwarmBB.getBB().getSharedMap().get(SwarmBB.RUN_ID);
      System.out.println("BBB runID=" + runId);
      if (runId != null) {
        dunitRun = Swarm.getDUnitRun(runId);
        System.out.println("BBB lookedUp RUN:" + dunitRun);
      } else {
        dunitRun = Swarm.generateNewDUnitRun();
        System.out.println(
            "BBB GENNED UP A RUN:" + dunitRun + " mapping to id:" + dunitRun.getId());
        SwarmBB.getBB().getSharedMap().put(SwarmBB.RUN_ID, dunitRun.getId());
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      SwarmBB.getBB().getSharedLock().unlock();
    }
    return dunitRun;
  }
コード例 #2
0
 public long getTotalTestCount() {
   return SwarmBB.getTotalTestCount();
 }
コード例 #3
0
 public long getCurrentTestCount() {
   return SwarmBB.getCurrentTestCount();
 }
コード例 #4
0
 public void totalTestCountDetected(int count) {
   // TODO Auto-generated method stub
   SwarmBB.setTotalTestCount(count);
 }
コード例 #5
0
 public void testTypeDetected(TestType t) {
   // TODO Auto-generated method stub
   SwarmBB.setTestType(t);
 }
コード例 #6
0
 public void incCurrentTestCount() {
   // TODO Auto-generated method stub
   SwarmBB.incCurrentTestCount();
 }