You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <fl...@gmail.com> on 2010/12/01 08:20:11 UTC

Re: [lang3] Test Fail in Headless Mode (at Least on a Mac)

On Fri, Nov 26, 2010 at 12:49 AM, Henri Yandell <fl...@gmail.com> wrote:
> On Wed, Nov 24, 2010 at 3:51 AM, sebb <se...@gmail.com> wrote:
>> On 24 November 2010 11:02, Stefan Bodewig <bo...@apache.org> wrote:
>>> On 2010-11-24, sebb wrote:
>>>
>>>> On 24 November 2010 09:46, Stefan Bodewig <bo...@apache.org> wrote:
>>>>> On 2010-11-22, Jörg Schaible wrote:
>>>
>>>>>> Stefan Bodewig wrote:
>>>
>>>>>>> The commons-lang3 builds fail[2] and too me it looks as if this was
>>>>>>> because AWT is not running in headless mode,
>>>
>>>>> confirmed by passing -DargLine=-Djava.awt.headless=true to mvn - the
>>>>> builds now pass.
>>>
>>>>>>> I am suprised the problem doesn't show up in the other CI builds.
>>>
>>>>> Still surprised 8-)
>>>
>>>>> It doesn't show up inside Gump on Linux or FreeBSD running OpenJDK or
>>>>> the FreeBSD port of Sun's VM either - maybe this codebase's AWT detects
>>>>> there is no X-Server and switches to headless mode without any help.
>>>
>>>> Or are those nodes running a frame buffer (I think that is the correct name)?
>>>
>>> I don't recall installing Xvfb (the X server running in a virtual frame
>>> buffer) but it could have been pulled in as a dependency - and I'm
>>> pretty sure we don't start it even if it is installed.  No, I don't
>>> think the builds have any X server to connect to.
>>>
>>>> Since there are headless hosts, maybe code which is supposed to be
>>>> able to run anywhere (e.g. LANG) needs to take this into account?
>>>
>>>> I.e. Perhaps MacGump has found a bug in Lang?
>>>
>>> The tests that failed are the ones for the event package.  I don't see
>>> any uses of AWT in the main code but the tests use AWT classes
>>> (ActionEvent and ActionListener).  It seems as if the static initializer
>>> of either class already requires a working window system on a Mac - it
>>> may not be required on OpenJDK's AWT.
>>>
>>> I don't think the lang3 code requires a window system - so no bug in the
>>> main code - but its tests do.
>>
>> IMO the tests should then be fixed (I may have time to look later).
>>
>> If there is a suitable alternative to the AWT events then use that,
>> otherwise allow for the test failure when running headless.
>>
>> Seems to me it's more useful for Gump to point out these problems than
>> to try and hide them.
>
> +1.
>
> Perhaps:
>
> javax.naming.event.ObjectChangeListener
> javax.naming.event.NamingEvent

I've fixed this in r1040879. Generally I opted for using java.beans listeners.

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [lang3] Test Fail in Headless Mode (at Least on a Mac)

Posted by Henri Yandell <fl...@gmail.com>.
On Wed, Dec 1, 2010 at 7:57 AM, Matt Benson <gu...@gmail.com> wrote:
>
> On Dec 1, 2010, at 2:45 AM, Stefan Bodewig wrote:
>
>> On 2010-12-01, Henri Yandell wrote:
>>
>>> I've fixed this in r1040879.
>>
>> I can confirm it is fixed for Gump as well.  I removed all awt.headless
>> settings from the Gump descriptor and the build still passes on adam.
>>
>
> Having thought I was following this thread, being an OSX user, and having worked in the event package I can only apologize for having apparently skimmed over the part of the thread that revealed that this is where the fault was.  Thanks for fixing this, Hen.
>
> -Matt

No prob, gives me something to do :)

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [lang3] Test Fail in Headless Mode (at Least on a Mac)

Posted by Matt Benson <gu...@gmail.com>.
On Dec 1, 2010, at 2:45 AM, Stefan Bodewig wrote:

> On 2010-12-01, Henri Yandell wrote:
> 
>> I've fixed this in r1040879.
> 
> I can confirm it is fixed for Gump as well.  I removed all awt.headless
> settings from the Gump descriptor and the build still passes on adam.
> 

Having thought I was following this thread, being an OSX user, and having worked in the event package I can only apologize for having apparently skimmed over the part of the thread that revealed that this is where the fault was.  Thanks for fixing this, Hen.

-Matt

> Thanks!
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [lang3] Test Fail in Headless Mode (at Least on a Mac)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-12-01, Henri Yandell wrote:

> I've fixed this in r1040879.

I can confirm it is fixed for Gump as well.  I removed all awt.headless
settings from the Gump descriptor and the build still passes on adam.

Thanks!

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org