Thanks for the confirmation!
In this case I'm explicitly testing whether the persisted values in
solr.xml are the original, i.e something like
config="${mysystemvar:defaultvalue}" _but_ the actual value used in
Solr is the -Dmysystemvar=whatever and we don't store back
config="whatever"... i'm using unlikely system variable names, but
it's still best to have them undefined after the test I think...
Thanks again
Erick
On Sat, Jun 15, 2013 at 8:52 AM, Dawid Weiss <[email protected]> wrote:
> Yep. You cqn use that but it would be probably better if you did not have go
> modify system properties at all? ;)
>
> On Jun 15, 2013 2:47 PM, "Erick Erickson" <[email protected]> wrote:
>>
>> I just ran across this little gem in a test:
>>
>> @Rule
>> public TestRule solrTestRules =
>> RuleChain.outerRule(new SystemPropertiesRestoreRule())
>>
>> Without looking at the code, I'm guessing that this will restore any
>> system variables that you change in a test, is this correct?
>>
>> If so, I've found a new trick to make test writing easier <G>.....
>>
>> Thanks,
>> Erick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]