← Back to team overview

launchpad-dev team mailing list archive

Re: Converting old Windmill tests and make them pass

 

On Fri, Oct 02, 2009 at 02:06:58PM -0500, Edwin Grubbs wrote:
> I am in the process of converting the registry windmill tests to use
> ./bin/test, and I am having problems with sporadic
> LayerIsolationErrors. I put sleep() calls in the tearDown(), which
> reduced the frequency of errors from 10 out of 20 to 1 or 2 out of 20.
> I'm already using a 9 second sleep, so I think there must be a better
> way to prevent the errors.
> 
> Error in test lp.registry.windmill.tests.test_timeline_graph.TestTimelineGraph.test_series_timeline_graph
> Traceback (most recent call last):
>   File "/home/egrubbs/canonical/lp-branches/bug-430708-registry-windmill-layer/lib/canonical/testing/layers.py",
> line 394, in flagTestIsolationFailure
>     raise LayerIsolationError(message)
> LayerIsolationError: Test left new live threads: [<Thread(Thread-285,
> started daemon)>]
> 
> 
> The above error occurs most of the time after running
> test_series_timeline_graph, but if I run that test by itself, I never
> get any LayerIsolationErrors. You can see my changes in this branch:
> 
> lp:~edwin-grubbs/launchpad/bug-430708-registry-windmill-layer

This is too bad. I'm going to see if I can reproduce it on Monday. You
are using version 1.3beta3-lp-r1440, right? (Look in bin/test to see
which egg gets added to the sys.path.


> I had to add some sleep() calls inside a couple of the windmill tests
> to prevent sporadic failures where it can't find a node. This is odd,
> since I put a waits.forElement() call directly before the
> assertNode(), so it should never fail to find a node.

Right, this shouldn't happen. I think we've seen this before. Do you
have an example where you need to add a sleep()?


-- 
Björn Tillenius | https://launchpad.net/~bjornt



Follow ups

References