diff --git a/oslo/messaging/_drivers/amqp.py b/oslo/messaging/_drivers/amqp.py index 287878721..95a84f17e 100644 --- a/oslo/messaging/_drivers/amqp.py +++ b/oslo/messaging/_drivers/amqp.py @@ -323,7 +323,7 @@ class _MsgIdCache(object): before ack is returned. This method prevents doing it. """ if UNIQUE_ID in message_data: - msg_id = message_data[UNIQUE_ID] + msg_id = message_data.pop(UNIQUE_ID) if msg_id not in self.prev_msgids: self.prev_msgids.append(msg_id) else: diff --git a/tests/test_rabbit.py b/tests/test_rabbit.py index 3cb2203da..e6de418bd 100644 --- a/tests/test_rabbit.py +++ b/tests/test_rabbit.py @@ -52,7 +52,4 @@ class TestRabbitDriver(test_utils.BaseTestCase): received = listener.poll() self.assertTrue(received is not None) self.assertEquals(received.ctxt, {}) - - # FIXME(markmc): this should be done by the driver - received.message.pop('_unique_id') self.assertEquals(received.message, {'foo': 'bar'})