[ 
https://issues.apache.org/jira/browse/GEODE-5332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated GEODE-5332:
----------------------------------
    Labels: pull-request-available  (was: )

> 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
>
>
> 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)

Reply via email to