On Wed, Jun 11, 2008 at 3:31 PM, jaredmac <[EMAIL PROTECTED]> wrote:

> ...So even if I change my client to respond to bind() and unbind() methods, 
> and
> dynamically register/unregister these menu items, then the UI will work
> correctly (with menu items coming and going, I suppose), but the unit tests
> still fail. I want to avoid that....

I was confronted with the same problem when writing the integration
tests for Sling [1], and my (pragmatic) solution is, when the
integration tests start, to run some initial tests repeatedly until
the results show a stable state, or a timer expires.

In the case of Sling, those initial tests execute some simple
high-level operations that only work if all services required to run
the integration tests are present. That's a somewhat brute-force way
of finding out about the state of our system, but it is simple to
understand and debug, and works for us. We are planning to integrate
this "system readyness testing" into the platform, see SLING-490.

-Bertrand

[1]  http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/launchpad/webapp

[2] See waitForSlingStartup() method in
http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to