On 25 Jan 2011, at 11:33, Pete Muir wrote:


On 25 Jan 2011, at 11:09, Galder Zamarreņo wrote:

Rather than sleeping which is a bit rudimentary and might hide problems (even after 10 seconds the cluster might not be formed due to env issues), you could wait until the view contains 2 nodes. IIRC, code that this can be found in the testsuite and radargun too. I think radargun might be a better example since different cache managers run in diff processes, whereas in the testsuite they run in same process. So, the methods, IIRC, are a bit different.
Here is the code:
https://github.com/radargun/radargun/blob/master/framework/src/main/java/org/radargun/stages/ClusterValidationStage.java