コード例 #1
0
ファイル: test_crashstorage.py プロジェクト: snorp/socorro
    def test_transaction_ack_crash_fails_gracefully(self):
        config = self._setup_config()
        config.logger = Mock()
        crash_store = RabbitMQCrashStorage(config)
        crash_store.acknowledgment_queue.put("b2")
        crash_store._consume_acknowledgement_queue()

        config.logger.warning.assert_called_once_with(
            "RabbitMQCrashStorage tried to acknowledge crash %s" ", which was not in the cache", "b2", exc_info=True
        )
コード例 #2
0
ファイル: test_crashstorage.py プロジェクト: snorp/socorro
    def test_transaction_ack_crash_fails_gracefully(self):
        config = self._setup_config()
        config.logger = Mock()
        crash_store = RabbitMQCrashStorage(config)
        crash_store.acknowledgment_queue.put('b2')
        crash_store._consume_acknowledgement_queue()

        config.logger.warning.assert_called_once_with(
            'RabbitMQCrashStorage tried to acknowledge crash %s'
            ', which was not in the cache',
            'b2',
            exc_info=True)
コード例 #3
0
ファイル: test_crashstorage.py プロジェクト: froydnj/socorro
    def test_ack_crash_fails_gracefully(self, caplogpp):
        caplogpp.set_level('WARNING')

        config = self._setup_config()
        crash_store = RabbitMQCrashStorage(config)
        crash_store.acknowledgment_queue.put('b2')
        crash_store._consume_acknowledgement_queue()

        recs = [(rec.message, rec.exc_info) for rec in caplogpp.records]
        assert (recs[0][0] == (
            'RabbitMQCrashStorage tried to acknowledge crash b2, which was not in the cache'
        ))
        assert recs[0][1] is not None