Use latest eventlet in probe tests
Note that eventlet 0.22.0+ closes connections between requests when it stops accepting connections. Partial-Bug: #1792615 Change-Id: Ia8d9ab95e2aad40e8d797acc3423a917e809ffdb
This commit is contained in:
		@@ -62,6 +62,10 @@ class TestWSGIServerProcessHandling(unittest.TestCase):
 | 
			
		||||
        self.assertEqual(resp.status // 100, 4)
 | 
			
		||||
        resp.read()
 | 
			
		||||
 | 
			
		||||
        # Start the request before reloading...
 | 
			
		||||
        putrequest(conn, 'PUT', 'blah',
 | 
			
		||||
                   headers={'Content-Length': len(body)})
 | 
			
		||||
 | 
			
		||||
        manager.reload()
 | 
			
		||||
 | 
			
		||||
        post_reload_pids = set(pid for server in manager.servers
 | 
			
		||||
@@ -72,15 +76,19 @@ class TestWSGIServerProcessHandling(unittest.TestCase):
 | 
			
		||||
            starting_pids, post_reload_pids)
 | 
			
		||||
        self.assertFalse(starting_pids & post_reload_pids, msg)
 | 
			
		||||
 | 
			
		||||
        # ... and yet we can keep using the same connection!
 | 
			
		||||
        putrequest(conn, 'PUT', 'blah',
 | 
			
		||||
                   headers={'Content-Length': len(body)})
 | 
			
		||||
        # ... and make sure we can finish what we were doing, and even
 | 
			
		||||
        # start part of a new request
 | 
			
		||||
        conn.send(body)
 | 
			
		||||
        resp = conn.getresponse()
 | 
			
		||||
        self.assertEqual(resp.status // 100, 4)
 | 
			
		||||
        resp.read()
 | 
			
		||||
        # We can even read the body
 | 
			
		||||
        self.assertTrue(resp.read())
 | 
			
		||||
 | 
			
		||||
        # close our connection
 | 
			
		||||
        # After this, we're in a funny spot. With eventlet 0.22.0, the
 | 
			
		||||
        # connection's now closed, but with prior versions we could keep
 | 
			
		||||
        # going indefinitely. See https://bugs.launchpad.net/swift/+bug/1792615
 | 
			
		||||
 | 
			
		||||
        # Close our connection, to make sure old eventlet shuts down
 | 
			
		||||
        conn.close()
 | 
			
		||||
 | 
			
		||||
        # sanity
 | 
			
		||||
 
 | 
			
		||||
@@ -18,8 +18,8 @@
 | 
			
		||||
    - name: installing dependencies
 | 
			
		||||
      yum: name={{ item }} state=present
 | 
			
		||||
      with_items:
 | 
			
		||||
        - python-eventlet
 | 
			
		||||
        - python-pyeclib
 | 
			
		||||
        - python-pip
 | 
			
		||||
        - python-nose
 | 
			
		||||
        - python-swiftclient
 | 
			
		||||
 | 
			
		||||
@@ -27,3 +27,4 @@
 | 
			
		||||
      pip: name={{ item }} state=present extra_args='--upgrade'
 | 
			
		||||
      with_items:
 | 
			
		||||
        - crudini
 | 
			
		||||
        - eventlet
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user