See <https://builds.apache.org/job/Aurora/398/changes>

Changes:

[maxim] Improve documentation and testing for host maintenance API

------------------------------------------
[...truncated 2925 lines...]
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.2ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.1ms
twitter.common.python.http: Crawling http://effbot.org/downloads
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(uncached)
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(uncached) :: Fetching http://effbot.org/downloads
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(uncached) :: Fetching http://effbot.org/downloads :: Resolving effbot.org
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(uncached) :: Fetching http://effbot.org/downloads :: Connecting to effbot.org
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(uncached) :: Caching http://effbot.org/downloads
twitter.common.python.http: Crawling http://effbot.org/downloads: 265.5ms
twitter.common.python.http:   Opening (uncached): 258.0ms
twitter.common.python.http:     Fetching http://effbot.org/downloads: 202.0ms
twitter.common.python.http:       Resolving effbot.org: 3.6ms
twitter.common.python.http:       Connecting to effbot.org: 106.8ms
twitter.common.python.http:     Caching http://effbot.org/downloads: 55.8ms
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/ :: 
Opening (uncached)
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/ :: 
Opening (uncached) :: Fetching https://pypi.python.org/simple/py/
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/ :: 
Opening (uncached) :: Fetching https://pypi.python.org/simple/py/ :: Resolving 
pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/ :: 
Opening (uncached) :: Fetching https://pypi.python.org/simple/py/ :: Connecting 
to pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/ :: 
Opening (uncached) :: Caching https://pypi.python.org/simple/py/
twitter.common.python.http: Crawling https://pypi.python.org/simple/py/: 68.8ms
twitter.common.python.http:   Opening (uncached): 67.0ms
twitter.common.python.http:     Fetching https://pypi.python.org/simple/py/: 
66.1ms
twitter.common.python.http:       Resolving pypi.python.org: 1.5ms
twitter.common.python.http:       Connecting to pypi.python.org: 11.6ms
twitter.common.python.http:     Caching https://pypi.python.org/simple/py/: 
0.6ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.1ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.2ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.0ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 0.9ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 0.9ms
twitter.common.python.http: Crawling http://effbot.org/downloads
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(cached)
twitter.common.python.http: Crawling http://effbot.org/downloads: 7.8ms
twitter.common.python.http:   Opening (cached): 0.2ms
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/ 
:: Opening (uncached)
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/ 
:: Opening (uncached) :: Fetching https://pypi.python.org/simple/cov-core/
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/ 
:: Opening (uncached) :: Fetching https://pypi.python.org/simple/cov-core/ :: 
Resolving pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/ 
:: Opening (uncached) :: Fetching https://pypi.python.org/simple/cov-core/ :: 
Connecting to pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/ 
:: Opening (uncached) :: Caching https://pypi.python.org/simple/cov-core/
twitter.common.python.http: Crawling https://pypi.python.org/simple/cov-core/: 
68.3ms
twitter.common.python.http:   Opening (uncached): 67.6ms
twitter.common.python.http:     Fetching 
https://pypi.python.org/simple/cov-core/: 66.9ms
twitter.common.python.http:       Resolving pypi.python.org: 1.5ms
twitter.common.python.http:       Connecting to pypi.python.org: 12.4ms
twitter.common.python.http:     Caching 
https://pypi.python.org/simple/cov-core/: 0.4ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.1ms
twitter.common.python.http: Crawling http://effbot.org/downloads
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(cached)
twitter.common.python.http: Crawling http://effbot.org/downloads: 7.6ms
twitter.common.python.http:   Opening (cached): 0.2ms
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/ :: 
Opening (uncached)
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/ :: 
Opening (uncached) :: Fetching https://pypi.python.org/simple/wheel/
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/ :: 
Opening (uncached) :: Fetching https://pypi.python.org/simple/wheel/ :: 
Resolving pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/ :: 
Opening (uncached) :: Fetching https://pypi.python.org/simple/wheel/ :: 
Connecting to pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/ :: 
Opening (uncached) :: Caching https://pypi.python.org/simple/wheel/
twitter.common.python.http: Crawling https://pypi.python.org/simple/wheel/: 
71.1ms
twitter.common.python.http:   Opening (uncached): 67.4ms
twitter.common.python.http:     Fetching https://pypi.python.org/simple/wheel/: 
66.4ms
twitter.common.python.http:       Resolving pypi.python.org: 1.6ms
twitter.common.python.http:       Connecting to pypi.python.org: 11.7ms
twitter.common.python.http:     Caching https://pypi.python.org/simple/wheel/: 
0.7ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.1ms
twitter.common.python.http: Crawling http://effbot.org/downloads
twitter.common.python.http: Crawling http://effbot.org/downloads :: Opening 
(cached)
twitter.common.python.http: Crawling http://effbot.org/downloads: 8.0ms
twitter.common.python.http:   Opening (cached): 0.2ms
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/ 
:: Opening (uncached)
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/ 
:: Opening (uncached) :: Fetching https://pypi.python.org/simple/lockfile/
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/ 
:: Opening (uncached) :: Fetching https://pypi.python.org/simple/lockfile/ :: 
Resolving pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/ 
:: Opening (uncached) :: Fetching https://pypi.python.org/simple/lockfile/ :: 
Connecting to pypi.python.org
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/ 
:: Opening (uncached) :: Caching https://pypi.python.org/simple/lockfile/
twitter.common.python.http: Crawling https://pypi.python.org/simple/lockfile/: 
68.2ms
twitter.common.python.http:   Opening (uncached): 67.2ms
twitter.common.python.http:     Fetching 
https://pypi.python.org/simple/lockfile/: 66.5ms
twitter.common.python.http:       Resolving pypi.python.org: 1.5ms
twitter.common.python.http:       Connecting to pypi.python.org: 12.2ms
twitter.common.python.http:     Caching 
https://pypi.python.org/simple/lockfile/: 0.4ms
twitter.common.python.http: Opening (uncached)
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/c/cov-core/cov-core-1.12.tar.gz#md5=4982572cfb179bbc004cf3c334686561
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/c/cov-core/cov-core-1.12.tar.gz#md5=4982572cfb179bbc004cf3c334686561
 :: Resolving pypi.python.org
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/c/cov-core/cov-core-1.12.tar.gz#md5=4982572cfb179bbc004cf3c334686561
 :: Connecting to pypi.python.org
twitter.common.python.http: Opening (uncached) :: Caching 
https://pypi.python.org/packages/source/c/cov-core/cov-core-1.12.tar.gz#md5=4982572cfb179bbc004cf3c334686561
twitter.common.python.http: Opening (uncached): 74.5ms
twitter.common.python.http:   Fetching 
https://pypi.python.org/packages/source/c/cov-core/cov-core-1.12.tar.gz#md5=4982572cfb179bbc004cf3c334686561:
 72.6ms
twitter.common.python.http:     Resolving pypi.python.org: 1.4ms
twitter.common.python.http:     Connecting to pypi.python.org: 17.5ms
twitter.common.python.http:   Caching 
https://pypi.python.org/packages/source/c/cov-core/cov-core-1.12.tar.gz#md5=4982572cfb179bbc004cf3c334686561:
 1.5ms
twitter.common.python: Packaging cov-core
twitter.common.python: Packaging cov-core :: Installing /tmp/tmpADZkVE
twitter.common.python: Packaging cov-core: 308.0ms
twitter.common.python:   Installing /tmp/tmpADZkVE: 296.3ms
twitter.common.python.http: Opening (uncached)
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/p/py/py-1.4.20.tar.gz#md5=5f1708be5482f3ff6711dfd6cafd45e0
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/p/py/py-1.4.20.tar.gz#md5=5f1708be5482f3ff6711dfd6cafd45e0
 :: Resolving pypi.python.org
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/p/py/py-1.4.20.tar.gz#md5=5f1708be5482f3ff6711dfd6cafd45e0
 :: Connecting to pypi.python.org
twitter.common.python.http: Opening (uncached) :: Caching 
https://pypi.python.org/packages/source/p/py/py-1.4.20.tar.gz#md5=5f1708be5482f3ff6711dfd6cafd45e0
twitter.common.python.http: Opening (uncached): 139.2ms
twitter.common.python.http:   Fetching 
https://pypi.python.org/packages/source/p/py/py-1.4.20.tar.gz#md5=5f1708be5482f3ff6711dfd6cafd45e0:
 71.4ms
twitter.common.python.http:     Resolving pypi.python.org: 7.7ms
twitter.common.python.http:     Connecting to pypi.python.org: 13.1ms
twitter.common.python.http:   Caching 
https://pypi.python.org/packages/source/p/py/py-1.4.20.tar.gz#md5=5f1708be5482f3ff6711dfd6cafd45e0:
 67.3ms
twitter.common.python: Packaging py
twitter.common.python: Packaging py :: Installing /tmp/tmpA5HYfk
twitter.common.python: Packaging py: 232.7ms
twitter.common.python:   Installing /tmp/tmpA5HYfk: 230.3ms
twitter.common.python.http: Opening (uncached)
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz#md5=ce61468d4c1263e3005737bbed2641f0
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz#md5=ce61468d4c1263e3005737bbed2641f0
 :: Resolving pypi.python.org
twitter.common.python.http: Opening (uncached) :: Fetching 
https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz#md5=ce61468d4c1263e3005737bbed2641f0
 :: Connecting to pypi.python.org
twitter.common.python.http: Opening (uncached) :: Caching 
https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz#md5=ce61468d4c1263e3005737bbed2641f0
twitter.common.python.http: Opening (uncached): 75.9ms
twitter.common.python.http:   Fetching 
https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz#md5=ce61468d4c1263e3005737bbed2641f0:
 64.2ms
twitter.common.python.http:     Resolving pypi.python.org: 1.6ms
twitter.common.python.http:     Connecting to pypi.python.org: 12.0ms
twitter.common.python.http:   Caching 
https://pypi.python.org/packages/source/l/lockfile/lockfile-0.9.1.tar.gz#md5=ce61468d4c1263e3005737bbed2641f0:
 11.3ms
twitter.common.python: Packaging lockfile
twitter.common.python: Packaging lockfile :: Installing /tmp/tmpqLtmKU
twitter.common.python: Packaging lockfile: 214.5ms
twitter.common.python:   Installing /tmp/tmpqLtmKU: 212.6ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.6ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.6ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.2ms
twitter.common.python.http: Crawling /home/jenkins/.pex/build
twitter.common.python.http: Crawling /home/jenkins/.pex/build: 1.0ms
Resolved distributions:
  twitter.common.quantity 0.3.0
  twitter.common.python 0.5.6
  twitter.common.string 0.3.0
  cov-core 1.12
  ansicolors 1.0.2
  twitter.common.options 0.3.0
  twitter.common.lang 0.3.0
  twitter.common.confluence 0.3.0
  pystache 0.5.3
  twitter.common.config 0.3.0
  pytest-cov 1.6
  wheel 0.23.0
  lockfile 0.9.1
  twitter.common.collections 0.3.0
  coverage 3.7.1
  python-daemon 1.5.5
  twitter.common.decorators 0.3.0
  twitter.pants 0.0.23
  twitter.common.contextutil 0.3.0
  twitter.common.rwbuf 0.3.0
  twitter.common.util 0.3.0
  Pygments 1.4
  py 1.4.20
  twitter.common.dirutil 0.3.0
  requests 2.0.0
  pytest 2.5.2
  psutil 1.1.2
  twitter.common.process 0.3.0
  setuptools 2.2
  elementtree 1.2.7-20070827-preview
  twitter.common.log 0.3.0
  twitter.common.threading 0.3.0
  Markdown 2.1.1
Setting entry point to twitter.pants.bin.pants_exe:main
Saving PEX file to 
/home/hudson/jenkins-slave/workspace/Aurora/build-support/pants-0.0.23.pex.tmp
Built pants-0.0.23.pex
============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- py-1.4.20 -- pytest-2.5.2 -- 
/usr/bin/python2.7
plugins: cov
collecting ... collected 9 items

src/test/python/apache/aurora/admin/test_host_maintenance.py <- 
/home/hudson/jenkins-slave/workspace/Aurora/src/test/python/apache/aurora/admin/test_host_maintenance.py:164:
 TestHostMaintenance.test_check_status FAILED

=================================== FAILURES ===================================
____________________ TestHostMaintenance.test_check_status _____________________

args = (<test_host_maintenance.TestHostMaintenance 
testMethod=test_check_status>, <MagicMock name='maintenance_status' 
spec='instancemethod' id='41875856'>)
keywargs = {}
extra_args = [<MagicMock name='maintenance_status' spec='instancemethod' 
id='41875856'>]
entered_patchers = [<mock._patch object at 0x27e2e10>]
exc_info = (<class '_pytest.assertion.reinterpret.AssertionError'>, 
AssertionError(u"assert [('us-west-00...com', 'NONE')] == 
[('...com...west-002.example.com', 'DRAINED') != ('us-west-001.example.com', 
'DRAINING')",), <traceback object at 0x27f71b8>)
patching = <mock._patch object at 0x27e2e10>
arg = <MagicMock name='maintenance_status' spec='instancemethod' id='41875856'>

    @wraps(func)
    def patched(*args, **keywargs):
        # don't use a with here (backwards compatability with Python 2.4)
        extra_args = []
        entered_patchers = []
    
        # can't use try...except...finally because of Python 2.4
        # compatibility
        exc_info = tuple()
        try:
            try:
                for patching in patched.patchings:
                    arg = patching.__enter__()
                    entered_patchers.append(patching)
                    if patching.attribute_name is not None:
                        keywargs.update(arg)
                    elif patching.new is DEFAULT:
                        extra_args.append(arg)
    
                args += tuple(extra_args)
>               return func(*args, **keywargs)

/tmp/tmpIYgVxn/.deps/mock-1.0.1-py27-none-any.whl/mock.py:1201: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_host_maintenance.TestHostMaintenance testMethod=test_check_status>
mock_maintenance_status = <MagicMock name='maintenance_status' 
spec='instancemethod' id='41875856'>

    @mock.patch("apache.aurora.client.api.AuroraClientAPI.maintenance_status",
        spec=AuroraClientAPI.maintenance_status)
    def test_check_status(self, mock_maintenance_status):
      mock_maintenance_status.return_value = 
Response(responseCode=ResponseCode.OK, result=Result(
          maintenanceStatusResult=MaintenanceStatusResult(set([
              HostStatus(host=TEST_HOSTNAMES[0], mode=MaintenanceMode.DRAINING),
              HostStatus(host=TEST_HOSTNAMES[1], mode=MaintenanceMode.DRAINED),
              HostStatus(host=TEST_HOSTNAMES[2], mode=MaintenanceMode.NONE)
          ]))
      ))
      maintenance = HostMaintenance(DEFAULT_CLUSTER, 'quiet')
      statuses = maintenance.check_status(TEST_HOSTNAMES)
      
mock_maintenance_status.assert_called_once_with(Hosts(set(TEST_HOSTNAMES)))
>     assert statuses == [
          (TEST_HOSTNAMES[0], 
MaintenanceMode._VALUES_TO_NAMES[MaintenanceMode.DRAINING]),
          (TEST_HOSTNAMES[1], 
MaintenanceMode._VALUES_TO_NAMES[MaintenanceMode.DRAINED]),
          (TEST_HOSTNAMES[2], 
MaintenanceMode._VALUES_TO_NAMES[MaintenanceMode.NONE])
      ]
E     AssertionError: assert [('us-west-00...com', 'NONE')] == 
[('us-west-001...com', 'NONE')]
E       At index 0 diff: ('us-west-002.example.com', 'DRAINED') != 
('us-west-001.example.com', 'DRAINING')

src/test/python/apache/aurora/admin/test_host_maintenance.py:176: AssertionError
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
=========================== 1 failed in 0.62 seconds ===========================
Build operating on targets: 
OrderedSet([PythonTestSuite(src/test/python/BUILD:all)])
src.test.python.apache.aurora.admin.host_maintenance                            
.....   FAILURE
Build step 'Execute shell' marked build as failure

Reply via email to