Terracotta-OSS / terracotta-apis

Apache License 2.0
6 stars 25 forks source link

Create ConnectionService implementation for Passthrough #80

Closed jd0-sag closed 8 years ago

jd0-sag commented 8 years ago

Uses of the passthrough test environment are currently limited to the cases where the Connection object can be accessed, directly. Many applications would rather operate on a URI since that is how a more general-purpose configuration is performed, etc.

Passthrough could be used to test these applications if we provided a URI scheme and corresponding ConnectionService.

mathieucarbou commented 8 years ago

That is mainly our use cases in M&M, as I already explained you on day ;-)

So we had to develop a passthrough-extensions module which does exactly that, and also exposes the voltron ServiceProvider for the tests, to avoid having to develop sort of test entities

We basically ensure this ConnectionService comes first in the classpath, then we use a mock() construction that mocks the URI scheme we want by using the passthrough. We needed that because M&M supports several connection schemes.

@anthonydahanne : FYI