Page MenuHomeDevCentral

Use broker factory
ClosedPublic

Authored by dereckson on Jan 12 2016, 01:35.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 05:07
Unknown Object (File)
Wed, Dec 11, 06:12
Unknown Object (File)
Wed, Dec 11, 05:50
Unknown Object (File)
Wed, Dec 11, 05:50
Unknown Object (File)
Wed, Dec 11, 00:08
Unknown Object (File)
Sat, Dec 7, 04:36
Unknown Object (File)
Fri, Dec 6, 10:03
Unknown Object (File)
Wed, Dec 4, 17:44
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 Not Applicable
Unit
Tests Not Applicable

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.