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.
I get two consistent failures in this test case, for a while now in dev sources. Attaching log.
Created attachment 7148 [details] Log displaying failures
Please either fix a bug if there is one, make tests more robust, or remove the test methods from the stable config if they cannot be fixed.
I cannot reproduce it. From log it seems that incorrect TopComponent is activated when menu is retrieved from DockingAction. So I added check if right TopComponent is activated and if not activation is performed more times (actually 4 times) and if even after that right TopComponent is not activated test fails.
Tests passed now.
Actually I consistently get a different failure now.
Created attachment 7696 [details] Failure log
Please test now, I added logging what TopComponent is activated during test and also increased number of attempts to activate test TopComponent. I have one additional problem: I overwrote method getName() in test TopComponent defined in test and I get informational exception from serialization of this TopComponent. I attach log.
Created attachment 7716 [details] Log
Is this exception important or can I ignore it?
The exception looks like it might be significant. Maybe Jan knows about it?
Still fails for me in trunk. I don't know where you added this logging, but XTest does not seem to preserve logfiles from tests run in ide mode. Please let me know which specific file under nb_all/xtest/instance/results/ you would like to see running nb_all/xtest/instance/build.xml; I don't see anything relevant. (The log for core unit tests shows details for code-mode tests, but for ide-mode tests it shows only that NB was started, and a couple of stack traces.) Will attach my core_unit.log just in case it is helpful.
Created attachment 7722 [details] Log file from test (might be useless)
Not this. Go to test bag output -> IDE log -> output -> output from Ant runner eg. file:///mnt/local/mslama/netbeans/nbsrc_test/core/test/results/testrun_021021-170828/testbag_1/sys/ide/output/org.netbeans.xtest.AntRunner.out It contains all logs from tests. (Unfortunately ide.log itself does not contain these logs.)
Created attachment 7727 [details] The requested log file
Please try again. I added logging of all TopComponents/Modes on current workspace. It is strange that TopComponent 'A' is activated. There should be no such TopComponent. What configuration do you use? I have no idea why requestFocus() fails on your machine.
Created attachment 7738 [details] Enriched log file
I run Linux, 2.4.7 kernel, Sawfish WM with sloppy focus, running tests under JDK 1.3.1_03. I tried running just APITests by itself several times, using JDK 1.4. Sometimes it passed, sometimes it failed ("could not activate right TopComponent"). Possible explanation: I routinely minimize test windows that are popped up during an XTest run. ide-mode tests are generally annoying; I run tests every day, but I have other things to do than turn on my screensaver and go for coffee whenever they are running (10-15 min). They pop up unsolicited windows while I am trying to read mail, etc. Since my request to have MDI mode be used consistently for ide-mode tests was rejected (issue #20829, and issue #16297 not effectively implemented since non-editor-mode components appear as separate frames), it is even worse: some tests (e.g. property sheet) open a long string of new windows. So I am in the habit of minimizing all of them as they appear to get them out of the way. Probably tests which rely on details of which component has input focus etc. would be sensitive to minimization. Any suggestions? If not, mark FIXED or WORKSFORME or whatever.
I tried to minimize main window and it has no effect on my machine. But from your log there is no mode 'TestTopComponent'. It is strange. It seems that creating new mode fails from unknown reason. I attach my log. In test TopComponent.open() is called -> TopComponentManager is responsible for creating new mode for TopComponent. Let me know if you want to investigate it further. I will prepare patch with logging for winsys.
Created attachment 7739 [details] 'Correct' log
I prepared patch to log when TopComponentManager.doOpen() method is entered and when new mode is created for test TopComponent. Log for this appears on console where you run ant from.
Created attachment 7752 [details] Patch for winsys
Regards to IllegalAccessException. It should not hurt anything. Java beans use to declare getName/getDisplayName a public access modifier usually. But for sure, please file a bug against the openide/settings to treat that case. Thanks.
Are you still waiting for some info from me? I mostly forgot about this. I still see 2 winsys test failures regularly: org.netbeans.core.windows.APITests.testAPI_20153 fail Could not activate right TopComponent. org.netbeans.core.windows.layers.TCParserTest.testUpdateSave error try to access class org.netbeans.core.windows.layers.TCRef from class org.netbeans.core.windows.layers.TCParserTest
I fixed issue #28097 (TCRef interface is set back to public). I am not able to reproduce this issue. In your environment there are some components whcih should not be there. Marian did you see this problem on test machines? I close this issue. Jesse if you want to investigate it further reopen it.
I don't really have the ability to investigate it more - I don't know the code - so if you cannot fix the test, please exclude it from the stable config. You can run it manually to verify certain changes if you want to. I would like to have 100% of tests pass, and this is one of three regular failures I get.
Ok I will split test and exclude failing tests from stable config.
Fixed in main trunk.
closed