Merge lp:~jtv/maas/bug-1364713 into lp:~maas-committers/maas/trunk

Proposed by Jeroen T. Vermeulen
Status: Rejected
Rejected by: Andres Rodriguez
Proposed branch: lp:~jtv/maas/bug-1364713
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 61 lines (+5/-13)
3 files modified
src/maasserver/testing/testcase.py (+2/-7)
src/maasserver/tests/test_js.py (+2/-5)
versions.cfg (+1/-1)
To merge this branch: bzr merge lp:~jtv/maas/bug-1364713
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+235594@code.launchpad.net

Commit message

Upgrade Selenium, and re-enable the tests we were skipping because of a startup bug in the old version.

Description of the change

One test failed when I enabled it: it depended on NODE_STATUS.ALLOCATED having the value 6, which we recently changed.

Jeroen

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) wrote :

Nice! Thanks for taking care of this.

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (2.0 MiB)

The attempt to merge lp:~jtv/maas/bug-1364713 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security Release.gpg
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security Release
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb curl daemontools debhelper dh-apport distro-info dnsutils firefox freeipmi-tools ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make pep8 postgresql pyflakes python-amqplib python-bzrlib python-celery python-convoy python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-mimeparse python-mock python-netaddr python-netifaces python-nose python-oauth python-oops python-oops-amqp python-oops-datedir-repo python-oops-twisted python-oops-wsgi python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-seamicroclient python-simplejson python-simplestreams python-sphinx python-subunit ...

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The error looks spurious. I see it in somewhere on the order of 1% of test runs. The weird thing is that the response dump in the error output shows the zone_widget element:

          <div id="zone_widget" class="hidden">

But the error seems to say that that widget can't be found:

NoSuchElementException: Message: u'Unable to locate element: {"method":"id","selector":"zone_widget"}'

This is for a failure while looking for that widget as in:

    def test_zone_widget_is_visible_only_when_set_zone_selected(self):
        self.log_in('admin')
        self.get_page('node-list')
        zone_widget = self.selenium.find_element_by_id('zone_widget')

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I don't know if it matters, but I do see this in the error output, tagged onto the end of the request dump:

maasserver: ERROR: Unable to get RPC connection for cluster ''
maasserver: ERROR: Unable to get RPC connection for cluster ''
maasserver: ERROR: Unable to get RPC connection for cluster ''
maasserver: ERROR: Unable to get RPC connection for cluster ''
maasserver: ERROR: Unable to get RPC connection for cluster ''

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I wonder if the problem is one of progressive parsing in Selenium, where buffers of response data get parsed as they come in. That sort of thing can easily break when the thing you're looking for straddles a buffer boundary.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I waited a while (in case of third-party bugs whose fixes might already be in the pipeline) and ran the failing test again a thousand times: no failures. I feel a little more confident landing this branch now.

Revision history for this message
MAAS Lander (maas-lander) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (1.0 MiB)

The attempt to merge lp:~jtv/maas/bug-1364713 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:2 http://security.ubuntu.com trusty-security Release [59.7 kB]
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [59.7 kB]
Get:5 http://security.ubuntu.com trusty-security/main Sources [45.3 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Get:6 http://security.ubuntu.com trusty-security/universe Sources [10.8 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Get:7 http://security.ubuntu.com trusty-security/main amd64 Packages [144 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:8 http://security.ubuntu.com trusty-security/universe amd64 Packages [48.9 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [121 kB]
Get:10 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [85.1 kB]
Get:11 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [324 kB]
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [205 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Fetched 1,105 kB in 0s (1,929 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential bzr-builddeb curl daemontools debhelper dh-apport distro-info dnsutils firefox freeipmi-tools ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make pep8 postgresql pyflakes python-amqplib python-bzrlib python-celery python-convoy python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-mimeparse python-mock python-netaddr python-netifaces python-nose python-oauth python-oops python-oops-amqp python-oops-datedir-repo python-oops-twisted python-oops-wsgi python-openssl python-pa...

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Ugh. New failure: maasserver.views.tests.test_nodes.NodeListingSelectionJSControls.test_node_list_js_control_select_all can't find a tag with id all_system_id_control. And this time I don't see it in the HTML.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

It looks like somebody else landed the same change, but without first ensuring that tests passed consistently. :-(

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/testing/testcase.py'
2--- src/maasserver/testing/testcase.py 2014-09-26 07:52:40 +0000
3+++ src/maasserver/testing/testcase.py 2014-09-29 09:58:31 +0000
4@@ -38,9 +38,7 @@
5 DjangoTestCase,
6 )
7 from maastesting.fixtures import DisplayFixture
8-# XXX bigjools 2014-09-03 bug=1364713
9-# tests disabled while waiting for new selenium.
10-#from maastesting.testcase import MAASTestCase
11+from maastesting.testcase import MAASTestCase
12 from maastesting.utils import run_isolated
13 from mock import Mock
14 import provisioningserver
15@@ -144,10 +142,7 @@
16 wsgiref.handlers.BaseHandler.log_exception = self.old_log_exception
17
18
19-# XXX bigjools 2014-09-03 bug=1364713
20-# All tests disabled while waiting for new selenium.
21-#class SeleniumTestCase(MAASTestCase, LiveServerTestCase):
22-class SeleniumTestCase:
23+class SeleniumTestCase(MAASTestCase, LiveServerTestCase):
24 """Selenium-enabled test case.
25
26 Two users are pre-created: "user" for a regular user account, or "admin"
27
28=== modified file 'src/maasserver/tests/test_js.py'
29--- src/maasserver/tests/test_js.py 2014-09-03 05:02:55 +0000
30+++ src/maasserver/tests/test_js.py 2014-09-29 09:58:31 +0000
31@@ -1,4 +1,4 @@
32-# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the
33+# Copyright 2012-2014 Canonical Ltd. This software is licensed under the
34 # GNU Affero General Public License version 3 (see the file LICENSE).
35
36 """Run YUI3 unit tests with SST (http://testutils.org/sst/)."""
37@@ -166,10 +166,7 @@
38 self.fail(message)
39
40
41-# XXX bigjools 2014-09-03 bug=1364713
42-# Disabled while waiting for new selenium.
43-#class YUIUnitTestsLocal(YUIUnitTestsBase, MAASTestCase):
44-class YUIUnitTestsLocal:
45+class YUIUnitTestsLocal(YUIUnitTestsBase, MAASTestCase):
46
47 scenarios = tuple(
48 (relpath(path, root), {"test_url": "file://%s" % abspath(path)})
49
50=== modified file 'versions.cfg'
51--- versions.cfg 2014-08-13 21:49:35 +0000
52+++ versions.cfg 2014-09-29 09:58:31 +0000
53@@ -53,7 +53,7 @@
54 python-subunit = 0.0.18
55 pytz = 2012c
56 rabbitfixture = 0.3.5
57-selenium = 2.39
58+selenium = 2.43
59 simplejson = 3.3.1
60 sst = 0.2.2
61 testresources = 0.2.7