Author: toad
Date: 2008-02-05 00:57:46 +0000 (Tue, 05 Feb 2008)
New Revision: 17544

Modified:
   trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java
Log:
Keep going forever, count number of successful tests.

Modified: trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java
===================================================================
--- trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java      
2008-02-05 00:55:02 UTC (rev 17543)
+++ trunk/freenet/src/freenet/node/simulator/RealNodeULPRTest.java      
2008-02-05 00:57:46 UTC (rev 17544)
@@ -113,6 +113,10 @@
         for(int i=0;i<NUMBER_OF_NODES;i++)
             nodes[i].start(false);

+        int successfulTests = 0;
+        
+        while(true) {
+        
         // Now create a key.

         byte[] buf = new byte[32];
@@ -169,8 +173,16 @@
                                if(nodes[i].fetch(fetchKey, true) != null)
                                        count++;
                        }
-                       System.err.println("T="+x+" : 
"+count+'/'+nodes.length+" have the data.");
+                       System.err.println("T="+x+" : 
"+count+'/'+nodes.length+" have the data on test "+successfulTests+".");
+                       if(count == nodes.length) {
+                               successfulTests++;
+                               System.err.println("SUCCESSFUL TEST # 
"+successfulTests+"!!!");
+                               System.err.println();
+                               break;
+                       }
                }
+               
+        }

     }



Reply via email to