← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~frankban/launchpad/bug-1002796-js-timeout into lp:launchpad

 

Francesco Banconi has proposed merging lp:~frankban/launchpad/bug-1002796-js-timeout into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1002796 in Launchpad itself: "lib/lp/registry/javascript/tests/test_milestone_creation_failures.html times out rarely/intermittently in parallel tests"
  https://bugs.launchpad.net/launchpad/+bug/1002796

For more details, see:
https://code.launchpad.net/~frankban/launchpad/bug-1002796-js-timeout/+merge/107774

= Summary =

test_milestone_creation_failures.html times out rarely/intermittently in parallel tests. This doesn't seem a test ordering or isolation issue, and it's not possible to reproduce the failure using the worker list attached to the bug.
I've reproduced the bug running the single failing test inside a heavy loaded container, e.g.::

    $ sudo apt-get install stress

    $ stress --cpu 8 --io 8 --vm 4 --vm-bytes 1000M

    $ xvfb-run bin/test -cvvt lib/lp/registry/javascript/tests/test_milestone_creation_failures.html

It seems that YUI times out while loading nodes if the machine is heavy loaded, and this can be the case of ec2 instances we use for parallel tests.

== Proposed fix ==

Increase YUI.GlobalConfig.timeout from 50 to 500 ms.

== Implementation details ==

lib/lp/registry/javascript/tests/test_milestone_creation_failures.html:
see Proposed fix.

== Tests ==

$ stress --cpu 8 --io 8 --vm 4 --vm-bytes 1000M

$ w
 11:46:06 up 5 days,  3:14,  3 users,  load average: 23.06, 21.75, 20.66

$ xvfb-run bin/test -cvvt lib/lp/registry/javascript/tests/test_milestone_creation_failures.html
[Running tests at level 1
Running lp.testing.layers.YUITestLayer tests:
  Set up lp.testing.layers.BaseLayer in 1.490 seconds.
  Set up lp.testing.layers.FunctionalLayer^[^[ in 1 minutes 54.360 seconds.
  Set up lp.testing.layers.YUITestLayer in 0.004 seconds.
  Running:
 lib/lp/registry/javascript/tests/test_milestone_creation_failures.html
  Ran 1 tests with 0 failures and 0 errors in 9.340 seconds.
Tearing down left over layers:
  Tear down lp.testing.layers.YUITestLayer ... not supported
  Tear down lp.testing.layers.FunctionalLayer ... not supported
  Tear down lp.testing.layers.BaseLayer in 0.001 seconds.

== Demo and Q/A ==

no qa

== lint ==

Linting changed files:
  lib/lp/registry/javascript/tests/test_milestone_creation_failures.html

-- 
https://code.launchpad.net/~frankban/launchpad/bug-1002796-js-timeout/+merge/107774
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~frankban/launchpad/bug-1002796-js-timeout into lp:launchpad.
=== modified file 'lib/lp/registry/javascript/tests/test_milestone_creation_failures.html'
--- lib/lp/registry/javascript/tests/test_milestone_creation_failures.html	2012-03-21 01:06:04 +0000
+++ lib/lp/registry/javascript/tests/test_milestone_creation_failures.html	2012-05-29 13:11:19 +0000
@@ -15,7 +15,7 @@
       <script type="text/javascript">
           YUI.GlobalConfig = {
               fetchCSS: false,
-              timeout: 50,
+              timeout: 500,
               ignore: [
                   'yui2-yahoo', 'yui2-event', 'yui2-dom',
                   'yui2-calendar','yui2-dom-event'


Follow ups