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 97742 - Introduce a method for closing indexes
Summary: Introduce a method for closing indexes
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
Keywords: T9Y
Depends on:
Reported: 2007-03-13 14:44 UTC by Andrei Badea
Modified: 2011-09-01 07:44 UTC (History)
0 users

See Also:
Exception Reporter:

Proposed change (650 bytes, text/plain)
2007-03-13 14:46 UTC, Andrei Badea

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2007-03-13 14:44:53 UTC
After using


in a test case stray Lucene lock files remain in the userdir, causing the next
test cases to take longer to execute (while Lucene waits for the lock) and dump
a warning message. ClassIndexManager.close() can't be used because that would
close ClassIndexManager for subsequent test cases too.

Perhaps a method like closeIndexes() could be introduced in ClassIndexManager,
see the attached patch.
Comment 1 Andrei Badea 2007-03-13 14:46:02 UTC
Created attachment 39434 [details]
Proposed change
Comment 2 Jan Lahoda 2007-03-13 16:17:32 UTC
See also SourceUtilsTestUtil2.disableLocks()
Comment 3 Andrei Badea 2007-03-13 16:31:14 UTC
Huh, pretty well hidden :-) What about moving these methods to a single class,
e.g., JavaSourceTestUtils or similar?
Comment 4 Andrei Badea 2007-04-13 10:32:11 UTC
Index.setCacheFolder() could be moved to such a class too.
Comment 5 Tomas Zezula 2007-04-13 12:31:39 UTC
OK, all these methods should go into single class ClassIndexManager or Index to
improve the testability.
Comment 6 Jiri Prox 2008-04-11 00:52:15 UTC
moving opened issues from TM <= 6.1 to TM=Dev