Page MenuHomeDevCentral

Use broker factory
ClosedPublic

Authored by dereckson on Jan 12 2016, 01:35.
Tags
None
Referenced Files
F3749293: D231.diff
Sat, Nov 16, 14:20
Unknown Object (File)
Thu, Nov 14, 08:34
Unknown Object (File)
Wed, Nov 13, 13:49
Unknown Object (File)
Fri, Nov 8, 20:31
Unknown Object (File)
Thu, Nov 7, 16:53
Unknown Object (File)
Thu, Nov 7, 03:02
Unknown Object (File)
Thu, Nov 7, 02:34
Unknown Object (File)
Wed, Nov 6, 16:12
Subscribers

Details

Reviewers
dereckson
Commits
Unknown Object (Diffusion Commit)
rNOTIF4e32e7178be6: Use broker factory
Summary

Broker service provider change

We move the responsibility to prepare a working broker instance
from the application service provider to the broker library.

D225 has introduced a factory to create an instance of Broker
from a configuration array. We now require keruald/broker 0.3.2+.

The broker factory received the array defined in config/broker.php
as key connections.<correct driver>. The driver is specified at the
driver key from the same file. Each respects 12 factors principle.

Test infrastructure change

We already mock the Blackhole broker in some tests and we will keep
the test code as is, to allow any queer choices like 'integration
test with a working broker' in the future.

For the remaining, regular tests, we want to use everywhere a
blackhole broker and so we update the configuration in BROKER_DRIVER
enviromnet variable.

We add a definition of this blackhole driver to our config.

Test Plan

composer update && phpunit

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Passed
Unit
Tests Passed
Branch
broker

Event Timeline

dereckson retitled this revision from to Use broker factory.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
tests/Providers/BrokerServiceProviderTest.php
15

\n at EOF is expected.

dereckson edited edge metadata.
dereckson marked an inline comment as done.
This revision is now accepted and ready to land.Jan 12 2016, 01:37

Currently request a working RabbitMQ server to run tests, we're switching to blackhole.

dereckson edited edge metadata.

We already mock the Blackhole broker in some tests and we will keep
the test code as is, to allow any queer choices like 'integration
test with a working broker' in the future.

For the remaining, regular tests, we want to use everywhere a
blackhole broker and so we update the configuration in BROKER_DRIVER
enviromnet variable.

We add a definition of this blackhole driver to our config.

We require keruald/broker 0.3.2+ to get rid of a notice when building
a blackhole broker instance.

This revision is now accepted and ready to land.Jan 12 2016, 02:07
This revision was automatically updated to reflect the committed changes.