> On Aug. 12, 2016, 4:28 p.m., Dan Smith wrote: > > geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java, > > line 49 > > <https://reviews.apache.org/r/51010/diff/1/?file=1471613#file1471613line49> > > > > This could probably extend ExternalResource rather than directly > > implementing TestRule.
Changed to extend ExternalResource. > On Aug. 12, 2016, 4:28 p.m., Dan Smith wrote: > > geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java, > > line 99 > > <https://reviews.apache.org/r/51010/diff/1/?file=1471613#file1471613line99> > > > > I'm not sure getLocatorVM is the right thing to call this. It's not > > really getting the locator, it's actually configuring the locator. I > > suspect many tests you might not actually need to get the locator VM. > > > > Could the Rule just set this stuff up before the test runs, I wonder? The idea here is to create cluster (locator, and nodes) using the given/custom properties...This simplifies setting up a cluster for those tests...We could change the Rule name appropriately, i could not come up with a better name.... There could be requirement for a test where it needs a vm configured with specified properties...We could add one more Rule that can do that... > On Aug. 12, 2016, 4:28 p.m., Dan Smith wrote: > > geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java, > > line 113 > > <https://reviews.apache.org/r/51010/diff/1/?file=1471613#file1471613line113> > > > > What if someone calls getVM instead of getNodeVM? I wonder if it would > > be possible to make this work so that someone doesn't need to call > > getNodeVM? One could call getVm and configure it as they want (create a new DS)...And join the cluster using the locator port from the Locator configured in Rule. > On Aug. 12, 2016, 4:28 p.m., Dan Smith wrote: > > geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java, > > line 122 > > <https://reviews.apache.org/r/51010/diff/1/?file=1471613#file1471613line122> > > > > Use port 0 instead to avoid potential races. You can get the port back > > from the locator after it starts. See DUnitLauncher.startLocator. Done. > On Aug. 12, 2016, 4:28 p.m., Dan Smith wrote: > > geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java, > > line 129 > > <https://reviews.apache.org/r/51010/diff/1/?file=1471613#file1471613line129> > > > > This could be a lambda: locator.invoke(() -> {...}) Done. - anilkumar ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51010/#review145629 ----------------------------------------------------------- On Aug. 11, 2016, 10:34 p.m., anilkumar gingade wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51010/ > ----------------------------------------------------------- > > (Updated Aug. 11, 2016, 10:34 p.m.) > > > Review request for geode, anilkumar gingade, Barry Oglesby, Jason Huynh, Kirk > Lund, William Markito, nabarun nag, Dan Smith, and xiaojian zhou. > > > Repository: geode > > > Description > ------- > > Added test to validate Cluster configuration support for Lucene indexes. > > Added a new Rule to create Distributed System with test/custom > configuration...The "LocatorServerConfigurationRule" makes it easier to > create a Locator or cluster nodes with required configuration. > > > Diffs > ----- > > > geode-core/src/test/java/com/gemstone/gemfire/test/dunit/rules/LocatorServerConfigurationRule.java > PRE-CREATION > > geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/configuration/LuceneClusterConfigurationDUnitTest.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/51010/diff/ > > > Testing > ------- > > Run the newly added test. > > > Thanks, > > anilkumar gingade > >