Commit bf473606 authored by Federico Sismondi's avatar Federico Sismondi

Merge branch 'develop' into 'master'

Develop

See merge request !6
parents 2c2d9f74 aa3c2ab3
......@@ -44,13 +44,15 @@ class CoreConsumer(BaseConsumer):
# let's send bootstrap message
msg = {
'message': '{component} is up!'.format(component=self.name),
"_type": '{component}.ready'.format(component=self.name)
'_type': 'testingtool.component.ready',
'component': self.name,
"message": "Component ready to start test suite."
}
producer = Producer(connection,serializer='json')
producer.publish(msg,
exchange=self.exchange,
routing_key='control.session.bootstrap'
routing_key='control.session'
)
def handle_control(self, body, message):
......
import json
import logging
import os
import pika
import pytest
......@@ -56,8 +56,16 @@ typedef enum {
@pytest.fixture
def producer():
try:
AMQP_URL = str(os.environ['AMQP_URL'])
AMQP_EXCHANGE = str(os.environ['AMQP_EXCHANGE'])
except:
AMQP_URL = 'amqp://guest:guest@localhost/'
AMQP_EXCHANGE = 'default'
connection = pika.BlockingConnection(
pika.connection.URLParameters('amqp://paul:iamthewalrus@f-interop.rennes.inria.fr/session01'))
pika.connection.URLParameters(AMQP_URL))
channel = connection.channel()
channel.confirm_delivery()
return channel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment