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 166198 - Race condition in LibraryManager
Summary: Race condition in LibraryManager
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 16:37 UTC by Jaroslav Tulach
Modified: 2009-09-22 09:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2009-05-28 16:37:52 UTC
Apply following diff to one of project.libraries tests and it starts to fail. It should not.

diff -r f7984afa3ada 
project.libraries/test/unit/src/org/netbeans/modules/project/libraries/LibrariesStorageDeadlock166109Test.java
--- a/project.libraries/test/unit/src/org/netbeans/modules/project/libraries/LibrariesStorageDeadlock166109Test.java    
Thu May 28 17:34:43 2009 +0200
+++ b/project.libraries/test/unit/src/org/netbeans/modules/project/libraries/LibrariesStorageDeadlock166109Test.java    
Thu May 28 17:36:53 2009 +0200
@@ -94,7 +94,7 @@
         // thus can yield wrong results. To workaround that (and simulate the
         // deadlock) here is direct call to reset the cache.
         // Ideally it shall not be necessary for arr1 to have length 1
-        LibraryManagerTest.resetCache();
+//        LibraryManagerTest.resetCache();
         Library[] arr1 = LibraryManager.getDefault().getLibraries();
         assertEquals("One", 1, arr1.length);
     }
Comment 1 Tomas Zezula 2009-09-21 19:41:33 UTC
Fixed by #1399f036a1db, now just applied the diff which caused test failure before.
Comment 2 Tomas Zezula 2009-09-21 19:42:59 UTC
jet-main: c5846476044a
Comment 3 Quality Engineering 2009-09-22 09:29:30 UTC
Integrated into 'main-golden', will be available in build *200909220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c5846476044a
User: Tomas Zezula <tzezula@netbeans.org>
Log: #166198:Race condition in LibraryManager