← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~allenap/launchpad/rabbit-layer into lp:launchpad

 

Gavin Panella has proposed merging lp:~allenap/launchpad/rabbit-layer into lp:launchpad with lp:~lifeless/launchpad/rabbit as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~allenap/launchpad/rabbit-layer/+merge/62146

Nothing much, this is basically lifeless's RabbitMQLayer branch with some lint fixes. I can't replicate the errors he was seeing before, so perhaps they've been addressed by some other work I've done around Rabbit. We'll see.
-- 
https://code.launchpad.net/~allenap/launchpad/rabbit-layer/+merge/62146
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/launchpad/rabbit-layer into lp:launchpad.
=== modified file 'lib/lp/services/rabbit/testing/server.py'
--- lib/lp/services/rabbit/testing/server.py	2011-05-24 14:55:46 +0000
+++ lib/lp/services/rabbit/testing/server.py	2011-05-24 14:55:49 +0000
@@ -15,11 +15,8 @@
 import re
 import socket
 import subprocess
-<<<<<<< TREE
 import sys
-=======
 from textwrap import dedent
->>>>>>> MERGE-SOURCE
 import time
 
 from amqplib import client_0_8 as amqp
@@ -207,6 +204,7 @@
     :ivar pidfile: The file the pid should be written to.
     :ivar nodename: The name of the node.
     """
+
     def setUp(self):
         super(RabbitServerResources, self).setUp()
         self.hostname = 'localhost'
@@ -439,15 +437,5 @@
 
     def setUp(self):
         super(RabbitServer, self).setUp()
-<<<<<<< TREE
         self.config = self.useFixture(RabbitServerResources())
         self.runner = self.useFixture(RabbitServerRunner(self.config))
-=======
-        self.config = self.useFixture(AllocateRabbitServer())
-        self.server = RunRabbitServer(self.config)
-        self.useFixture(self.server)
-        self.host = 'localhost:%s' % self.config.port
-
-    def getDetails(self):
-        return self.server.getDetails()
->>>>>>> MERGE-SOURCE

=== modified file 'lib/lp/services/rabbit/tests/test_fixture.py'
--- lib/lp/services/rabbit/tests/test_fixture.py	2011-05-24 14:55:46 +0000
+++ lib/lp/services/rabbit/tests/test_fixture.py	2011-05-24 14:55:49 +0000
@@ -31,7 +31,6 @@
 
         with fixture:
             # We can connect.
-<<<<<<< TREE
             connect_arguments = {
                 "host": 'localhost:%s' % fixture.config.port,
                 "userid": "guest", "password": "guest",
@@ -40,32 +39,19 @@
             amqp.Connection(**connect_arguments).close()
             # And get a log file.
             log = fixture.runner.getDetails()["rabbit.log"]
-=======
-            host = fixture.host
-            conn = amqp.Connection(host=host, userid="guest",
-            password="guest", virtual_host="/", insist=False)
-            conn.close()
-            # And get a log file
-            log = fixture.getDetails()['rabbit log file']
->>>>>>> MERGE-SOURCE
             # Which shouldn't blow up on iteration.
             list(log.iter_text())
-<<<<<<< TREE
 
-=======
             # There is a (launchpad specific) config fixture. (This could be a
             # separate class if we make the fixture external in the future).
             expected = dedent("""\
                 [rabbitmq]
-                host: %s
+                host: localhost:%d
                 userid: guest
                 password: guest
                 virtual_host: /
-                """ % host)
+                """ % fixture.config.port)
             self.assertEqual(expected, fixture.config.service_config)
 
-        finally:
-            fixture.cleanUp()
->>>>>>> MERGE-SOURCE
         # The daemon should be closed now.
         self.assertRaises(socket.error, amqp.Connection, **connect_arguments)