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 269997 - Some test methods of CslTestBase may fail when CPU usage is low
Summary: Some test methods of CslTestBase may fail when CPU usage is low
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-06 11:24 UTC by junichi11
Modified: 2017-03-08 02:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch (5.29 KB, patch)
2017-03-06 11:27 UTC, junichi11
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description junichi11 2017-03-06 11:24:21 UTC
There are failure unit tests of php.editor in my local environment. It seems that it occurs when CPU usage is low.

I tried to investigate and fix it. Probably, a test gets items from an index when an indexer is indexing. So correct items are not gotten. They are successful when ParserManager.parseWhenScanFinished() is used in the CslTestBase class instead of ParserManager.parse().

Could you please look at the patch? (I fixed only methods that fail in php.editor. )

My environments:
Product Version: NetBeans IDE 8.2 (Build 201609300101)
Java: 1.8.0_121; Java HotSpot(TM) 64-Bit Server VM 25.121-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_121-b13
System: Linux version 4.4.0-65-generic running on amd64; UTF-8; ja_JP (nb)
Ubuntu 16.04

Thanks.
Comment 1 junichi11 2017-03-06 11:27:18 UTC
Created attachment 163778 [details]
patch
Comment 2 Tomas Zezula 2017-03-06 15:52:44 UTC
The patch seems good to me, feel free to commit it.
Thanks,
-- Tomas
Comment 3 junichi11 2017-03-07 01:25:19 UTC
(In reply to Tomas Zezula from comment #2)
> The patch seems good to me, feel free to commit it.

Thanks a lot!

Applied in web-main.
http://hg.netbeans.org/web-main/rev/14d86ab6dba5
Comment 4 Quality Engineering 2017-03-08 02:51:54 UTC
Integrated into 'main-silver', will be available in build *201703080002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/14d86ab6dba5
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #269997 - Some test methods of CslTestBase may fail when CPU usage is low