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.
In the compilation unit test CompilerTest a regression was caused by two ProjectMember's co-existing. This is demonstrated in the testPMSave test, this test is not independant so this should be commented out. The actual failure can be seen in the testGetCompilers test, where the project member lookup is different from the orginal project member lookup. This is causing a unit test failure.
Line 173 of CompilerTest.java helps the problem (when I added this assertion, everything seemed to work as expected), so you may want to look at commenting this out.
Chris, I am sorry, but I can't reproduce the problem. Both testPMSave and testGetCompilers pass on my machine (regardless of commented line 173). Could you describe a bit what you observed? As I understood you got two different lookups for single ProjectMember, right? Which assertion failed? Thanks.
Hi Vita, I just committed a new version of the CompilerTest, the assertion failure in this test is line 171 (the ProjectMembers are not the same even though they should be). I get this failure just about every time on my machine (Solaris 9, JDK 1.3.1_04). This is strange because the ProjectMember's in this test are both strongly reachable.
Finally I caught it. The problem is that CompilerTest opens *new* Projects instance before each test run (see setUp and Util.getProject which mounts new filesystem and opens the project from new FileObject). Since those Project instances have the same name the ProjectMemberConvertor gets confused and returns ProjectMember from wrong project when test asks for BuildTargetDependencies. As a hotfix I've adde CompilerTest.tearDown method which closes the project after each test. However, this is clear inconsistency in the project infra and should be avoided somehow. I'll solve this properly when implementing issue #30006 and issue #29810.
Done. Projects infra forbids to open several projects with same unique id. The IOException is thrown (annotated with message explaining situation for the user).
As described in http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the current work on projects prototype has been stopped. Marking issue as VERIFIED --->
---> CLOSED