You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Pervov (JIRA)" <ji...@apache.org> on 2007/01/09 11:30:28 UTC
[jira] Updated: (HARMONY-2951) [classlib][swing][test] Intermittent
failure of javax.swing.text.AbstractDocument_AbstractElement_MASNoLockTest
- timing problem
[ 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