~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/rabbit/testing/server.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-27 18:36:34 UTC
  • mfrom: (13023.9.12 rabbit-layer)
  • Revision ID: launchpad@pqm.canonical.com-20110627183634-96p3qvorpmvutpic
[r=jtv][no-qa] Introducing RabbitMQLayer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
import signal
15
15
import socket
16
16
import subprocess
 
17
from textwrap import dedent
17
18
import time
18
19
 
19
20
from amqplib import client_0_8 as amqp
101
102
    :ivar logfile: The logfile allocated for the server.
102
103
    :ivar nodename: The name of the node.
103
104
    """
 
105
 
104
106
    def setUp(self):
105
107
        super(RabbitServerResources, self).setUp()
106
108
        self.hostname = 'localhost'
109
111
        self.mnesiadir = self.useFixture(TempDir()).path
110
112
        self.logfile = os.path.join(self.homedir, 'server.log')
111
113
        self.nodename = os.path.basename(self.useFixture(TempDir()).path)
 
114
        self.service_config = dedent("""\
 
115
            [rabbitmq]
 
116
            host: localhost:%d
 
117
            userid: guest
 
118
            password: guest
 
119
            virtual_host: /
 
120
            """ % self.port)
112
121
 
113
122
    @property
114
123
    def fq_nodename(self):