01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest;
05:
06: import com.tc.util.Assert;
07:
08: import java.util.HashMap;
09: import java.util.Iterator;
10: import java.util.Map;
11:
12: /**
13: * @author steve To change the template for this generated type comment go to Window>Preferences>Java>Code
14: * Generation>Code and Comments
15: */
16: public class TransparencySpeedTestVerifier {
17: private Map resultRoot = new HashMap();
18:
19: public boolean verify() throws Exception {
20: synchronized (resultRoot) {
21: int desiredSize = TransparencySpeedTestApp.MUTATOR_COUNT
22: * TransparencySpeedTestApp.ADD_COUNT;
23: while (resultRoot.size() < desiredSize) {
24: System.out
25: .println("Verifier SIZE:" + resultRoot.size());
26: resultRoot.wait();
27: }
28: Assert.eval(resultRoot.size() == desiredSize);
29: int count = 0;
30: for (Iterator i = resultRoot.keySet().iterator(); i
31: .hasNext();) {
32: i.next();
33: count++;
34: // System.out.println("Got:" + count++ + " for:" + o);
35: }
36: Assert.eval(count == desiredSize);
37:
38: System.out.println("Done:" + count + " expected:"
39: + desiredSize);
40: return true;
41: }
42: }
43: }
|