You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2014/05/21 21:18:59 UTC
Failure in Core's LoggerTest.testReconfiguration
Failed tests:
LoggerTest.testReconfiguration:210 Reconfiguration failed expected not
same
Which ran fine from Eclipse.
I am wondering if this is due to the recent fork mode for tests in the
build?
>From Eclipse, the test class ran fine by itself.
Gary
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: Failure in Core's LoggerTest.testReconfiguration
Posted by Matt Sicker <bo...@gmail.com>.
Oh that's right. It won't swap in the new Configuration until it's done.
On 21 May 2014 16:00, Ralph Goers <ra...@dslextreme.com> wrote:
> The only way to tell is to see if the Configuration object is != to the
> original Configuration object, which is what LoggerTest is doing. But you
> have to loop doing that test.
>
> Ralph
>
> On May 21, 2014, at 1:35 PM, Gary Gregory <ga...@gmail.com> wrote:
>
> Can we ask an object if the reconfig is done? Then the test can poll on
> that...
>
> Gary
>
>
> On Wed, May 21, 2014 at 4:10 PM, Ralph Goers <ra...@dslextreme.com>wrote:
>
>> Reconfiguration now takes place on a separate thread. I introduced a
>> 100ms sleep to try to allow it to finish, but if you are running on a busy
>> or slow machine then the delay might not be enough. There was at least one
>> other class that I had to do the same thing to.
>>
>> Ralph
>>
>> On May 21, 2014, at 12:45 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>> I just ran another Maven build and all tests passed. So this is another
>> random failure due to recent changes, arg.
>>
>> Gary
>>
>>
>> On Wed, May 21, 2014 at 3:40 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> The test might be taking liberties with how it expects the runtime to
>>> behave. You might be on to something. Though log4j-core doesn't use forks.
>>>
>>>
>>> On 21 May 2014 14:18, Gary Gregory <ga...@gmail.com> wrote:
>>>
>>>> Failed tests:
>>>> LoggerTest.testReconfiguration:210 Reconfiguration failed expected
>>>> not same
>>>>
>>>> Which ran fine from Eclipse.
>>>>
>>>> I am wondering if this is due to the recent fork mode for tests in the
>>>> build?
>>>>
>>>> From Eclipse, the test class ran fine by itself.
>>>>
>>>> Gary
>>>>
>>>>
>>>> --
>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Failure in Core's LoggerTest.testReconfiguration
Posted by Ralph Goers <ra...@dslextreme.com>.
The only way to tell is to see if the Configuration object is != to the original Configuration object, which is what LoggerTest is doing. But you have to loop doing that test.
Ralph
On May 21, 2014, at 1:35 PM, Gary Gregory <ga...@gmail.com> wrote:
> Can we ask an object if the reconfig is done? Then the test can poll on that...
>
> Gary
>
>
> On Wed, May 21, 2014 at 4:10 PM, Ralph Goers <ra...@dslextreme.com> wrote:
> Reconfiguration now takes place on a separate thread. I introduced a 100ms sleep to try to allow it to finish, but if you are running on a busy or slow machine then the delay might not be enough. There was at least one other class that I had to do the same thing to.
>
> Ralph
>
> On May 21, 2014, at 12:45 PM, Gary Gregory <ga...@gmail.com> wrote:
>
>> I just ran another Maven build and all tests passed. So this is another random failure due to recent changes, arg.
>>
>> Gary
>>
>>
>> On Wed, May 21, 2014 at 3:40 PM, Matt Sicker <bo...@gmail.com> wrote:
>> The test might be taking liberties with how it expects the runtime to behave. You might be on to something. Though log4j-core doesn't use forks.
>>
>>
>> On 21 May 2014 14:18, Gary Gregory <ga...@gmail.com> wrote:
>> Failed tests:
>> LoggerTest.testReconfiguration:210 Reconfiguration failed expected not same
>>
>> Which ran fine from Eclipse.
>>
>> I am wondering if this is due to the recent fork mode for tests in the build?
>>
>> From Eclipse, the test class ran fine by itself.
>>
>> Gary
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> JUnit in Action, Second Edition
>> Spring Batch in Action
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> JUnit in Action, Second Edition
>> Spring Batch in Action
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
Re: Failure in Core's LoggerTest.testReconfiguration
Posted by Gary Gregory <ga...@gmail.com>.
Can we ask an object if the reconfig is done? Then the test can poll on
that...
Gary
On Wed, May 21, 2014 at 4:10 PM, Ralph Goers <ra...@dslextreme.com>wrote:
> Reconfiguration now takes place on a separate thread. I introduced a 100ms
> sleep to try to allow it to finish, but if you are running on a busy or
> slow machine then the delay might not be enough. There was at least one
> other class that I had to do the same thing to.
>
> Ralph
>
> On May 21, 2014, at 12:45 PM, Gary Gregory <ga...@gmail.com> wrote:
>
> I just ran another Maven build and all tests passed. So this is another
> random failure due to recent changes, arg.
>
> Gary
>
>
> On Wed, May 21, 2014 at 3:40 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> The test might be taking liberties with how it expects the runtime to
>> behave. You might be on to something. Though log4j-core doesn't use forks.
>>
>>
>> On 21 May 2014 14:18, Gary Gregory <ga...@gmail.com> wrote:
>>
>>> Failed tests:
>>> LoggerTest.testReconfiguration:210 Reconfiguration failed expected not
>>> same
>>>
>>> Which ran fine from Eclipse.
>>>
>>> I am wondering if this is due to the recent fork mode for tests in the
>>> build?
>>>
>>> From Eclipse, the test class ran fine by itself.
>>>
>>> Gary
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: Failure in Core's LoggerTest.testReconfiguration
Posted by Ralph Goers <ra...@dslextreme.com>.
Reconfiguration now takes place on a separate thread. I introduced a 100ms sleep to try to allow it to finish, but if you are running on a busy or slow machine then the delay might not be enough. There was at least one other class that I had to do the same thing to.
Ralph
On May 21, 2014, at 12:45 PM, Gary Gregory <ga...@gmail.com> wrote:
> I just ran another Maven build and all tests passed. So this is another random failure due to recent changes, arg.
>
> Gary
>
>
> On Wed, May 21, 2014 at 3:40 PM, Matt Sicker <bo...@gmail.com> wrote:
> The test might be taking liberties with how it expects the runtime to behave. You might be on to something. Though log4j-core doesn't use forks.
>
>
> On 21 May 2014 14:18, Gary Gregory <ga...@gmail.com> wrote:
> Failed tests:
> LoggerTest.testReconfiguration:210 Reconfiguration failed expected not same
>
> Which ran fine from Eclipse.
>
> I am wondering if this is due to the recent fork mode for tests in the build?
>
> From Eclipse, the test class ran fine by itself.
>
> Gary
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
Re: Failure in Core's LoggerTest.testReconfiguration
Posted by Gary Gregory <ga...@gmail.com>.
I just ran another Maven build and all tests passed. So this is another
random failure due to recent changes, arg.
Gary
On Wed, May 21, 2014 at 3:40 PM, Matt Sicker <bo...@gmail.com> wrote:
> The test might be taking liberties with how it expects the runtime to
> behave. You might be on to something. Though log4j-core doesn't use forks.
>
>
> On 21 May 2014 14:18, Gary Gregory <ga...@gmail.com> wrote:
>
>> Failed tests:
>> LoggerTest.testReconfiguration:210 Reconfiguration failed expected not
>> same
>>
>> Which ran fine from Eclipse.
>>
>> I am wondering if this is due to the recent fork mode for tests in the
>> build?
>>
>> From Eclipse, the test class ran fine by itself.
>>
>> Gary
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: Failure in Core's LoggerTest.testReconfiguration
Posted by Matt Sicker <bo...@gmail.com>.
The test might be taking liberties with how it expects the runtime to
behave. You might be on to something. Though log4j-core doesn't use forks.
On 21 May 2014 14:18, Gary Gregory <ga...@gmail.com> wrote:
> Failed tests:
> LoggerTest.testReconfiguration:210 Reconfiguration failed expected not
> same
>
> Which ran fine from Eclipse.
>
> I am wondering if this is due to the recent fork mode for tests in the
> build?
>
> From Eclipse, the test class ran fine by itself.
>
> Gary
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
--
Matt Sicker <bo...@gmail.com>