You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/10/17 12:10:34 UTC

[jira] Created: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

[test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
-------------------------------------------------------------------------------------

                 Key: HARMONY-1892
                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
             Project: Harmony
          Issue Type: Bug
          Components: build - test - ci
         Environment: Windows
            Reporter: Alexey A. Ivanov


When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
When running this test from Eclipse, there's no dialog popped up.

I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
        file = File.listRoots()[0];
        assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1892?page=comments#action_12443900 ] 
            
Paulex Yang commented on HARMONY-1892:
--------------------------------------

Neither do I, any committer has a machine with A:/ ?

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1892?page=comments#action_12445517 ] 
            
Stepan Mishura commented on HARMONY-1892:
-----------------------------------------

Hi Alexey,

With the second patch the test fails on Linux with:

name is empty

junit.framework.AssertionFailedError: name is empty at javax.swing.filechooser.FileSystemViewTest.assertNotEmpty(FileSystemViewTest.java:150) at javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName(FileSystemViewTest.java:87) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) at javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117) at javax.swing.SwingTestCase$1.run(SwingTestCase.java:45) at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:88) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:77) at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:131) at java.awt.EventQueue.dispatchEvent(EventQueue.java:144) at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:75) at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)

Could you comment/verify this?

Thanks,
Stepan.

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Stepan Mishura
>         Attachments: H1892-FileSystemViewTest.2.patch, H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1892?page=comments#action_12442862 ] 
            
Alexey A. Ivanov commented on HARMONY-1892:
-------------------------------------------

See the corresponding discussion on the mailing list: http://thread.gmane.org/gmane.comp.java.harmony.devel/16243/focus=16243

See also HARMONY-1893

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1892?page=all ]

Stepan Mishura reassigned HARMONY-1892:
---------------------------------------

    Assignee: Stepan Mishura

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Stepan Mishura
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1892?page=all ]

Alexey A. Ivanov updated HARMONY-1892:
--------------------------------------

    Attachment: H1892-FileSystemViewTest.2.patch

This new (.2.) patch modifies the last assertion in testGetSystemDisplayName() to coincide with similar assertions that get patched with HARMONY-1893.

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Stepan Mishura
>         Attachments: H1892-FileSystemViewTest.2.patch, H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1892?page=all ]

Mark Hindess reassigned HARMONY-1892:
-------------------------------------

    Assignee:     (was: Mark Hindess)

I can't reproduce this so I'll leave it to someone who can.


> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1892?page=all ]

Mark Hindess reassigned HARMONY-1892:
-------------------------------------

    Assignee: Mark Hindess

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Mark Hindess
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1892?page=all ]

Stepan Mishura resolved HARMONY-1892.
-------------------------------------

    Resolution: Fixed

I disagreed with removing these two line. I like them :-)
The problem is that test tries to delete drive A:. Let's look into the test:

    private File file;

    protected void setUp() throws Exception {
        ....
        file = new File(new File(System.getProperty("user.home")), new Integer((int)(Math.random() * 1000)).toString());
        file.deleteOnExit(); // <====== THE TEST TRIES TO DELETE IT HERE
    }

    protected void tearDown() throws Exception {
       ....
        file.delete();// <====== AND HERE
    }

    public void testGetSystemDisplayName() throws Exception {
        ....
        file = File.listRoots()[0]; //<========= IT IS DRIVE A: (of cause if you have one)
        assertNotSame(file.getName(), view.getSystemDisplayName(file));
    }

The bug was fixed in SWING module at r467585. Please check that the fix fully resolves your problem.

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Stepan Mishura
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1892?page=all ]

Alexey A. Ivanov updated HARMONY-1892:
--------------------------------------

    Attachment: H1892-FileSystemViewTest.patch

Removed the problem lines.

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1892?page=comments#action_12444645 ] 
            
Alexey A. Ivanov commented on HARMONY-1892:
-------------------------------------------

Stepan, thank you for finding the root cause. I must have missed it while looking at the test.
But I have some corrections: file.deleteOnExit() is always safe because it is called on the object created in setUp(). It is file.delete() from tearDown() that caused problems. It is needed there to make sure any files created are removed from the system, because several tests assign another object to the file field.

In regards to the fixes from HARMONY-1893, I'd prefer to modify the last assertion in testGetSystemDisplayName(). I'll prepare another patch.
And once again thank you for your great effort!

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Stepan Mishura
>         Attachments: H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1892) [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1892?page=comments#action_12445574 ] 
            
Alexey A. Ivanov commented on HARMONY-1892:
-------------------------------------------

Sorry, Stepan,
I must not have applied the patch when tested it on Linux.

We have a problem with Linux here since RI returns "/" whereas Harmony returns "". Therefore it's bug in Harmony.

> [test][swing] j.s.filechooser.FileSystemViewTest prompts to insert disk into drive A:
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1892
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1892
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>         Environment: Windows
>            Reporter: Alexey A. Ivanov
>         Assigned To: Stepan Mishura
>         Attachments: H1892-FileSystemViewTest.2.patch, H1892-FileSystemViewTest.patch
>
>
> When running tests, javax.swing.filechooser.FileSystemViewTest.testGetSystemDisplayName() prompts to insert disk into drive A:. This popup dialog stops this test and it fails.
> When running this test from Eclipse, there's no dialog popped up.
> I suggest removing the last two lines from testGetSystemDisplayName() to avoid this popup dialog. The problem lines are (85-86):
>         file = File.listRoots()[0];
>         assertNotSame(file.getName(), view.getSystemDisplayName(file));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira