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 134525

Summary: 'Cannot delete file' error when executing several suites
Product: platform Reporter: Oleg Khokhlov <ovk>
Component: NB JUnitAssignee: Jaroslav Tulach <jtulach>
Status: VERIFIED FIXED    
Severity: blocker CC: jtulach
Priority: P1    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Oleg Khokhlov 2008-05-05 14:31:05 UTC
When I'm trying to execute several test suites in a row, like this:

	s.addTest(NbModuleSuite.create(MainMenu.class,".*",".*"));
        s.addTest(NbModuleSuite.create(MainSubMenus.class,".*",".*"));

the second fails because of:

Cannot delete file, file = C:\WORK\perftests\simpletests\performance\j2se\build\test\unit\work\userdir\var\log\messages.log
java.io.IOException: Cannot delete file, file =
C:\WORK\perftests\simpletests\performance\j2se\build\test\unit\work\userdir\var\log\messages.log
	at org.netbeans.junit.NbTestCase.deleteFile(NbTestCase.java:750)
	at org.netbeans.junit.NbTestCase.deleteFile(NbTestCase.java:742)
	at org.netbeans.junit.NbTestCase.deleteFile(NbTestCase.java:742)
	at org.netbeans.junit.NbTestCase.deleteSubFiles(NbTestCase.java:759)
	at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:252)
	at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:212)

And actually I'd like to have some flag to skip  NbTestCase.deleteSubFiles(ud); to allow my test suites to reuse same
workdir.
Comment 1 Jaroslav Tulach 2008-06-12 15:50:34 UTC
Guys, give me steps to reproduce the problem please. I've opened performance/j2se project from simpletests branch and 
tried to execute MeasureJ2SEFootprintTest and nothing has been started, the build failed. But in different way 
unrelated to this issue...
Comment 2 Oleg Khokhlov 2008-06-16 13:00:20 UTC
please try to execute MeasureJ2SEMenusTest.
first suite - MainMenu.class will be executed and the rest will fail.
Comment 3 Jaroslav Tulach 2008-06-17 08:12:52 UTC
changeset:   84872:bed21d3c5033
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Tue Jun 17 09:12:22 2008 +0200
summary:     #134525: The invocations counter was supposed to be static
Comment 4 Oleg Khokhlov 2008-06-19 15:19:31 UTC
I've pulled fresh sources but bug still there.
Build 080619 from simpletests.
Comment 5 Jaroslav Tulach 2008-06-20 14:30:55 UTC
I think I forgot to push the changes, sorry. Now it shall be fixed.
Comment 6 Oleg Khokhlov 2008-06-23 13:11:33 UTC
verified with fresh sources.
Comment 7 Quality Engineering 2008-06-27 16:01:34 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #285 build
Changeset: http://hg.netbeans.org/main/rev/bed21d3c5033
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #134525: The invocations counter was supposed to be static