1 4 package com.tctest; 5 6 import com.tc.util.Assert; 7 8 import java.util.HashMap ; 9 import java.util.Iterator ; 10 import java.util.Map ; 11 12 16 public class TransparencySpeedTestVerifier { 17 private Map resultRoot = new HashMap (); 18 19 20 public boolean verify() throws Exception { 21 synchronized (resultRoot) { 22 int desiredSize = TransparencySpeedTestApp.MUTATOR_COUNT * TransparencySpeedTestApp.ADD_COUNT; 23 while(resultRoot.size() < desiredSize) { 24 System.out.println("Verifier SIZE:" + resultRoot.size()); 25 resultRoot.wait(); 26 } 27 Assert.eval(resultRoot.size() == desiredSize); 28 int count = 0; 29 for (Iterator i = resultRoot.keySet().iterator(); i.hasNext();) { 30 i.next(); 31 count++; 32 } 34 Assert.eval(count == desiredSize); 35 36 System.out.println("Done:" + count + " expected:" + desiredSize ); 37 return true; 38 } 39 } 40 } | Popular Tags |