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.
Testing of creating new file of custom filetype cant be done. Suppose we open new JavaProject. Then we try to create new file by using NewFileWizardOperator. The file we would like to create is in category "Other" and it is called "NewTechnology file". Then we should write code: NewFileWizardOperator nfwo = NewFileWizardOperator.invoke(); nfwo.selectProject("Sample project"); nfwo.selectCategory("Other"); nfwo.selectFileType("NewTechnologyfile"); nfwo.next(); nfwo.finish(); When testing reaches the finish() statement, console starts to throw: java.lang.OutOfMemoryError: PermGen space SEVERE [global] testing
It is not clear how do you run tests. Can you attach sample project? Also please attach IDE log file (http://wiki.netbeans.org/FaqLogMessagesFile).
Created attachment 147010 [details] qa-functional folder
The attachment contains test and empty folder. In certain moment test freezes and output shows: java.lang.OutOfMemoryError: PermGen space ... some stack trace ... Then repeating these two lines until i kill test SEVERE [global] java.lang.OutOfMemoryError: PermGen space
I tried it but I haven't found anything wrong on your test. Naturally it fails to find "Xdefinition file". I suspect it is a bug in a plugin which adds "Xdefinition file" template. Look at stack trace.
I also tried it with the same result - test failed, because it didn't find the XdefinitionTest project. See below. However, isn't that caused by insufficient perm gen size? Jirko, is there a way how to increase memory usage for the IDE opened by the test? java.lang.IllegalArgumentException: Attempted to pass a null directory to findProject at org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:229) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) [catch] at org.netbeans.jellytools.JellyTestCase.openProjects(JellyTestCase.java:404) at org.netbeans.jellytools.JellyTestCase.openDataProjects(JellyTestCase.java:452) at fileOperations.createNewFile.createNewFile(createNewFile.java:47)
> However, isn't that caused by insufficient perm gen size? Hardly. > Jirko, is there a way how to increase memory usage for the IDE opened by the test? Modify netbeans/etc/netbeans.conf or add test.run.args property with desired values to project.properties.
Fixed by modifying project.properties, added two lines: test.run.args=-ea -Xms128m -Xmx1024m -XX:MaxPermSpace=512m -XX:MaxPermSize=256m test.run.args=-da -Xmx512M -XX:MaxPermSize=256m However it revives an older bug report: org.netbeans.junit.NbModuleSuite.Configuration.addStartupArgument(String[] arguments) does not support jvm startup arguments