[
https://issues.apache.org/jira/browse/GEODE-5332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Murmann resolved GEODE-5332.
--------------------------------------
Resolution: Fixed
[~bijukunjummen] I am marking this as resolved, since the PR was merged a long
time ago. Please reopen and let me know if this was wrong.
> Easier way to pass properties to ClusterStartupRule
> ---------------------------------------------------
>
> Key: GEODE-5332
> URL: https://issues.apache.org/jira/browse/GEODE-5332
> Project: Geode
> Issue Type: Improvement
> Components: tests
> Reporter: Biju Kunjummen
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.8.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> ClusterStartupRule junit rule allows a geode system to be created for
> Integration and Distributed Tests. The properties for the test are currently
> provided the following way:
>
> {{Consumer<ClientCacheFactory> cacheSetup = (Serializable &
> Consumer<ClientCacheFactory>) cf -> cf}}
> {{.addPoolServer("localhost", server1Port).addPoolServer("localhost",
> server2Port)}}
>
> This makes the lambda expression Serializable and so can be passed to a
> remote vm to be executed.
>
> This cast in the expression can be made removed along these lines:
>
> {{SerializableConsumerIF<ClientCacheFactory> cacheSetup = cf -> cf}}
> {{.addPoolServer("localhost", server1Port).addPoolServer("localhost",
> server2Port)}}
> {{.setPoolSubscriptionEnabled(true).setPoolSubscriptionRedundancy(2);}}
> {{ClientVM client = csRule.startClientVM(3, props, cacheSetup,
> clientVersion);}}
>
> by introducing a type which implements both Serializable and Consumer types.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)