This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 46116 - failure in NbClipboardNativeTest
Summary: failure in NbClipboardNativeTest
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2004-07-14 10:03 UTC by pzajac
Modified: 2008-12-22 15:43 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception stacktrace (1.43 KB, text/plain)
2004-07-14 10:04 UTC, pzajac
Details
exception stacktrace from 2004-07-04 (1.42 KB, text/plain)
2004-07-19 14:15 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2004-07-14 10:03:23 UTC
[200407131800]
Test Case:  	 testClipboard
Test Suite: 	org.netbeans.core. NbClipboardNativeTest
Module Name: 	core

     junit.framework.AssertionFailedError: correct
string in clipboard expected:<17> but was:< *
Created on July 13, 2004, 2:21 PM
>
	at junit.framework.Assert.fail(Assert.java:47)
	at
junit.framework.Assert.failNotEquals(Assert.java:282)
	at
junit.framework.Assert.assertEquals(Assert.java:64)
	at
org.netbeans.core.NbClipboardNativeTest.testClipboard(NbClipboardNativeTest.java:86)
	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Comment 1 pzajac 2004-07-14 10:04:31 UTC
Created attachment 16235 [details]
exception stacktrace
Comment 2 Jesse Glick 2004-07-14 18:20:06 UTC
Not my code.
Comment 3 Jaroslav Tulach 2004-07-18 14:02:53 UTC
One line from cvs annotate:

1.1          (jglick   11-Feb-03):         assertEquals("correct
string in clipboard", "17", t.getTransferData(DataFlavor.stringFlavor));

Thus reassigning to jglick.

Anyway I think that the test is interfering with some external
changes. Maybe more tests or applications were running at the same
time? If that was exceptional failure, I would just close it.
Otherwise I woul think about running the test more times with same
delay hoping that it will work at least once...
Comment 4 Jesse Glick 2004-07-18 19:38:34 UTC
Hmm, I really don't know anything about NbClipboard any more and I
have not been working on the code at all (Yarda and Trung are the only
ones to work on it recently). Certainly don't remember what I might
have put in the unit test a year and a half ago. Petr, any idea how
long this has been failing? and on which platforms?
Comment 5 pzajac 2004-07-19 14:11:10 UTC
The test fails on windows and solaris. There is other solved issue
#39373 for this test. It seems that the issue was not probably
correctly fixed.  See to the attachment where is report of runned test
 from 2004-07-04 00:56:35.812. This issue was reported for test report
from  2004-07-14 07:12:58.0. There was some problems with ifrstructure
for running unit test. I am not sure when was first failure of this
test.    	  
Comment 6 pzajac 2004-07-19 14:15:07 UTC
Created attachment 16318 [details]
exception stacktrace from 2004-07-04
Comment 7 Jesse Glick 2004-07-20 16:58:01 UTC
Unless someone knowledgeable about clipboard handling offers to work
on this, this will not be touched anytime soon; I have no plans to
work on it. No idea if the failure corresponds to any loss of user
functionality. Will remove this test from the stable config in the
meantime.
Comment 8 _ ttran 2004-07-20 17:43:12 UTC
agree w/ Jesse, downgrade to P4
Comment 9 Jaroslav Tulach 2004-08-13 10:46:47 UTC
Caused by doing NbClipboard.setContent in async thread. As a result
your might invoke Ctrl+C immediatelly followed by Ctrl+V and still get
the previous content.
Comment 10 Jaroslav Tulach 2004-08-13 10:49:28 UTC
cvs -q ci -m "#46116: We have to waitFinished before doing getContent"
? X.diff
Checking in src/org/netbeans/core/NbClipboard.java;
/cvs/core/src/org/netbeans/core/NbClipboard.java,v  <--  NbClipboard.java
new revision: 1.18;
Comment 11 _ ttran 2004-08-13 13:15:46 UTC
haven't look at the diff. but if the IDE is already in a near deadlock
situation (the owner of the system clipboard is suspended), pressing
Ctrl+V will cause deadlock?  In other words do we timeout in
waitFinished()?
Comment 12 pzajac 2004-08-27 12:47:18 UTC
the tests passed