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 234612 - NB 7.3.1 tests ImportDataCreatorTest.testImportData_01 fails on JDK 8 by timeout
Summary: NB 7.3.1 tests ImportDataCreatorTest.testImportData_01 fails on JDK 8 by timeout
Status: RESOLVED DUPLICATE of bug 237546
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords: JDK_8, JDK_SPECIFIC, TEST
Depends on:
Blocks:
 
Reported: 2013-08-19 19:14 UTC by AlexanderIoffe
Modified: 2014-01-15 13:11 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace from RepositoryUpdater for JDK7. (4.95 KB, text/plain)
2013-08-21 13:11 UTC, Jiri Skrivanek
Details
Stack trace from RepositoryUpdater for JDK8. (4.79 KB, text/plain)
2013-08-21 13:13 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AlexanderIoffe 2013-08-19 19:14:25 UTC
Test always fail by timeout on JDK 8:

Error	Timeout occurred. Please note the time in the report does not reflect the time until the timeout.

junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
Comment 1 Jiri Skrivanek 2013-08-20 09:17:30 UTC
Fails for me even with JDK7 in 7.4 code base on

Waiting for classpath scanning to finish timed out
junit.framework.AssertionFailedError: Waiting for classpath scanning to finish timed out
	at org.netbeans.modules.csl.api.test.CslTestBase$Waiter.waitForScanToFinish(CslTestBase.java:4626)
	at org.netbeans.modules.csl.api.test.CslTestBase$Waiter.waitForScanToFinish(CslTestBase.java:4626)
	at org.netbeans.modules.csl.api.test.CslTestBase.setUp(CslTestBase.java:277)
Comment 2 Ondrej Brejla 2013-08-20 09:46:53 UTC
I just tested it on 7.3.1 and 7.4 both with JDK 1.7.0_25-b15 and everything everytime passed properly.

That think, that some tests sometimes fail due to "Waiting for classpath scanning to finish timed out" is a known issue, but it failes absolutely randomly (I've never seen that on my local machine, just on Hudson). We know about that, but noone knows what is the cause, since it can't be simply reproduced.

So for me this is won't fix, or P4. I'll leave it as P4 as a reminder, but I can't do anything with that. Just one think, imho it's not just a problem of testImportData_01 test, sometimes I see it on another tests as well. It's scanning related.

Product Version: NetBeans IDE 7.3.1 (Build 201306052037)
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.8.0-27-generic running on i386; UTF-8; cs_CZ (nb)

Product Version: NetBeans IDE Dev (Build 20130820-840feebb454f)
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.8.0-27-generic running on i386; UTF-8; cs_CZ (nb)
Comment 3 Ondrej Brejla 2013-08-20 09:49:35 UTC
Maybe guys from csl could know why scanning didn't finished...
Comment 4 AlexanderIoffe 2013-08-20 10:04:44 UTC
You should use JDK ___8___ to reproduce.
read the title please
Comment 5 Ondrej Brejla 2013-08-20 10:06:18 UTC
I responded to Jirka who has problem with JDK7 as well...
Comment 6 Jiri Skrivanek 2013-08-20 12:25:11 UTC
OK, sorry for mixing JDK7 here. Just fix problem with JDK8. But if you need to reproduce "waiting timed out", I am able to reproduce it reliably on my local Windows7.
Comment 7 AlexanderIoffe 2013-08-20 12:28:04 UTC
org.netbeans.modules.php.editor.actions.ImportDataCreatorTest::testImportData_09_issue209408 
fails with timeout as well.
Isn't it the same issue?
Comment 8 Ondrej Brejla 2013-08-20 12:34:33 UTC
As I wrote, it will probably fail in many cases (since scanning probably never finishes in CslTests)...it fails on JDK7 as well, just randomly. Svato, can you somehow evaluate, why scanning doesn't finish in some cases? Thanks in advance.
Comment 9 Jiri Skrivanek 2013-08-21 13:10:39 UTC
I spent some time on this and if you remove line suppressUselessLogging(); in PHPTestBase, you get the reason why waitForScanToFinish() fails. There is an exception thrown from RepositoryUpdater which causes that "scanSources" message is never logged. See attached stack traces for JDK7 and JDK8 cases.
Comment 10 Jiri Skrivanek 2013-08-21 13:11:21 UTC
Created attachment 139004 [details]
Stack trace from RepositoryUpdater for JDK7.
Comment 11 Jiri Skrivanek 2013-08-21 13:13:25 UTC
Created attachment 139005 [details]
Stack trace from RepositoryUpdater for JDK8.
Comment 12 Ondrej Brejla 2013-08-21 13:17:32 UTC
Thanks for that. Did you try to clean & build php.editor module right before running tests on JDK 7? Everytime I forget about it, I get CNF error.

On JDK 7 it seems to be JS problem (probably some tests from JS will not pass either). Can you confirm that?
Comment 13 Jiri Skrivanek 2013-08-22 07:43:10 UTC
Clean and build of php.editor helps on JDK7. If JavaScript tests depend on CslTestBase then they will fail as well.
Comment 14 Ondrej Brejla 2013-08-22 07:44:53 UTC
Yep, exactly as we thought. So reassigning to JS with JDK_8 keyword (since problem on JDK 8 is with nashorn). Right?
Comment 15 Jiri Skrivanek 2013-08-22 07:52:40 UTC
I don't know I didn't try JavaScript tests.
Comment 16 Ondrej Brejla 2013-08-22 08:00:59 UTC
I just talked with phejl (js nashron expert ;) and he said that that JS error shouldn't happen on NB 7.4 dev. That it should be fixed. So please, AlexanderIoffe, try it there [1]. If the problem still prersists, then simply reopen. Thanks.

[1] http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 17 Jiri Skrivanek 2013-08-23 11:13:26 UTC
Still the same exception as mentioned in comment 11. Reproduced in main repository #a7132d8a497b:

ant -k -f php.editor test test-generate-html -Dnbjdk.home=D:/jdk1.8.0 -Dtest.includes=**/ImportDataCreatorTest.class
Comment 18 Petr Hejl 2013-08-23 12:10:12 UTC
(In reply to Jiri Skrivanek from comment #17)
> Still the same exception as mentioned in comment 11. Reproduced in main
> repository #a7132d8a497b:
> 
> ant -k -f php.editor test test-generate-html -Dnbjdk.home=D:/jdk1.8.0
> -Dtest.includes=**/ImportDataCreatorTest.class

Looks like the test does not respect OpenIDE-Module-Hide-Classpath-Packages specified in libs.nashorn. Either the test or test classpath is misconfigured somehow or there is an issue in platform.
Comment 19 Jiri Skrivanek 2013-08-23 12:18:43 UTC
> Either the test or test classpath is
> misconfigured somehow or there is an issue in platform.

So, please, fix the test or test classpath. Let me know if I can help you. My configuration is the following:

Java(TM) SE Runtime Environment (build 1.8.0-ea-b103)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b45, mixed mode)
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 20 Petr Hejl 2014-01-15 13:11:28 UTC

*** This bug has been marked as a duplicate of bug 237546 ***