harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2951) [classlib][swing][test] Intermittent failure of javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest - timing problem
Date Tue, 09 Jan 2007 10:30:28 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Pervov updated HARMONY-2951:
----------------------------------

    Description: 
javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest fails from time to time with
the following message

junit.framework.AssertionFailedError
    at javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest.testAddAttributeAnotherThread(AbstractDocument_AbstractElement_MASNoLockTest.java:157)
    at java.lang.reflect.VMReflection.invokeMethod(Native Method)

The code for the test looks as follows:

    public void testAddAttributeAnotherThread() throws InterruptedException {
        aDocument.writeLock();
        new Thread(new Runnable() {
            public void run() {
                try {
                    aElement.addAttribute(keyInResolver, valueInResolver);
                } catch (Error e) {
                    exceptionThrown = true;
                }
            }
        }).start();
        Thread.sleep(500);
        assertTrue(exceptionThrown);
    }

If aElement.addAttribute does not throw an exception in half-a-second the test fails.

  was:
javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest fails with the following message

junit.framework.AssertionFailedError
    at javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest.testAddAttributeAnotherThread(AbstractDocument_AbstractElement_MASNoLockTest.java:157)
    at java.lang.reflect.VMReflection.invokeMethod(Native Method)

The code for the test looks as follows:

    public void testAddAttributeAnotherThread() throws InterruptedException {
        aDocument.writeLock();
        new Thread(new Runnable() {
            public void run() {
                try {
                    aElement.addAttribute(keyInResolver, valueInResolver);
                } catch (Error e) {
                    exceptionThrown = true;
                }
            }
        }).start();
        Thread.sleep(500);
        assertTrue(exceptionThrown);
    }

If aElement.addAttribute does not throw an exception in half-a-second the test fails.

        Summary: [classlib][swing][test] Intermittent failure of javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest
- timing problem  (was: [classlib][swing][test] Failure of javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest
- timing problem)

> [classlib][swing][test] Intermittent failure of javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest
- timing problem
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2951
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2951
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Sp2/ia32
>            Reporter: Pavel Pervov
>
> javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest fails from time to time
with the following message
> junit.framework.AssertionFailedError
>     at javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest.testAddAttributeAnotherThread(AbstractDocument_AbstractElement_MASNoLockTest.java:157)
>     at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> The code for the test looks as follows:
>     public void testAddAttributeAnotherThread() throws InterruptedException {
>         aDocument.writeLock();
>         new Thread(new Runnable() {
>             public void run() {
>                 try {
>                     aElement.addAttribute(keyInResolver, valueInResolver);
>                 } catch (Error e) {
>                     exceptionThrown = true;
>                 }
>             }
>         }).start();
>         Thread.sleep(500);
>         assertTrue(exceptionThrown);
>     }
> If aElement.addAttribute does not throw an exception in half-a-second the test fails.

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

        

Mime
View raw message