ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vyacheslav Daradur <daradu...@gmail.com>
Subject Re: MAC addresses emulation in Testing Framework
Date Tue, 13 Mar 2018 08:26:28 GMT
Dmitry, I've changed a logic of my tests and reflection isn't needed anymore.

Using reflection in tests, especially on 'private static | final'
fields may provide side-effects on other tests in a common test suite
which will be started in same JVM because of a previous value that may
be cached in other classes.

You can easily find such candidates by searching 'of
'GridTestUtils.setFieldValue(null' in the project.



On Tue, Mar 6, 2018 at 11:19 PM, Dmitry Pavlov <dpavlov.spb@gmail.com> wrote:
> Hi Vyacheslav,
>
> Why do you think reflection is bad in that case? Tests often use
> reflection, moreover U.field() to access some private stuff and test it.
>
> Sincerely,
> Dmitriy Pavlov
>
> вт, 6 мар. 2018 г. в 21:11, Vyacheslav Daradur <daradurvs@gmail.com>:
>
>> Hi, Igniters!
>>
>> I need your help about the following question:
>>
>> How to set-up (emulate) custom MAC address at node startup in Testing
>> Framework?
>>
>> I need to write unit-test that checks requests distribution which
>> depends on ClusterNodes MAC addresses. I tried to change it after
>> instance startup via reflection but looks like a bad idea and may lead
>> to unexpected behavior.
>>
>>
>> --
>> Best Regards, Vyacheslav D.
>>



-- 
Best Regards, Vyacheslav D.

Mime
View raw message