harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanov, Alexey A" <alexey.a.iva...@intel.com>
Subject RE: [classlib][swing] test "hangs": j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
Date Wed, 18 Oct 2006 09:37:10 GMT
>-----Original Message-----
>From: Alexey Varlamov [mailto:alexey.v.varlamov@gmail.com]
>Sent: Tuesday, October 17, 2006 4:41 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [classlib][swing] test "hangs":
>j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
>
>2006/10/17, Ivanov, Alexey A <alexey.a.ivanov@intel.com>:
>> Hello everyone,
>>
>> When running tests on Windows,
>> FileSystemViewTest.testGetSystemDisplayName() pops up a dialog
prompting
>> to insert disk into drive A:. This dialog prevents normal running of
>> other tests.
>>
>
>LOL
>
>> IMO, the problem assertion could be deleted without loss of coverage.
>> Any other comments/opinions?
>>
>> See the JIRA issue:
https://issues.apache.org/jira/browse/HARMONY-1892
>>
>>
>> Regards,
>> Alexey.
>>
>>
>> P.S. The problem code is at lines 85-86 in FileSystemViewTest.java:
>>        file = File.listRoots()[0];
>>        assertNotSame(file.getName(),
view.getSystemDisplayName(file));
>
>The assertion doesn't look foolproof anyway. Accordingly to spec
>getSystemDisplayName() should return *some* name, max what we may
>assert that it is not null and not empty.

It's supposed to do what you pointed out.
Actually here it merely asserts file.getName() !=
view.getSystemDisplayName(file), which is likely to be true even if
file.getName().equals(view.getSystemDisplayName(file)). Most likely the
author wanted the following assertion:
assertFalse(file.getName().equals(view.getSystemDisplayName(file)))


file.getName() returns "" both on Windows and Linux. And
view.getSystemDisplayName(file) returns "3.5 Floppy (A:)" on Windows and
"/" on Linux.


Regards,
Alexey.

>
>>
>> --
>> Alexey A. Ivanov
>> Intel Middleware Product Division
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail:
harmony-dev-help@incubator.apache.org
>>
>>
>
>---------------------------------------------------------------------
>Terms of use : http://incubator.apache.org/harmony/mailing.html
>To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>For additional commands, e-mail: harmony-dev-help@incubator.apache.org

--
Alexey A. Ivanov
Intel Middleware Product Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message