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.
See discussion here in issue 152249 - for some time commit validation would present a series of exception dialogs, yet pass. Probably it should not pass if a change causes some code that is run by one of the tests to throw an exception.
Just for an inspiration. XTest used to have XTestIDEHandler. http://hg.netbeans.org/main/file/016515477cc0/xtest/plugins_src/ide/src/org/netbeans/xtest/plugin/ide/XTestIDEHandler.java http://hg.netbeans.org/main/file/016515477cc0/xtest/plugins_src/ide/src/org/netbeans/xtest/plugin/ide/MainWithExec.java http://hg.netbeans.org/main/file/016515477cc0/xtest/plugins_src/ide/test/unit/src/org/netbeans/xtest/plugin/ide/test/XTestIDEHandlerTest.java
jtulach suggests: - add NbModuleSuite.Configuration.failOnException(Level.INFORMATIONAL).failOnLogMessage(Level.SEVERE) - use these methods in ide.kit/**/IDEValidation.java
I seem to need this functionality.
Created attachment 78117 [details] Proposed patch, please review
Strongly suggest adding an item to the developer FAQ about how to use this option once it is integrated: http://wiki.netbeans.org/NetBeansDeveloperFAQ
I guess your patch omits some NbModuleLogHandler.java? (hg addrem) The API looks fine to me.
This is more or less the code that I want to integrate: http://hg.netbeans.org/ergonomics/rev/4d394a5c7c7a
Shouldn't NbEvents read logger.log(warn ? Level.WARNING : Level.INFO, text + "\n"); ? Irritating that Level is not Comparable<Level>. I will file a JRE RFE when I get a chance.
http://hg.netbeans.org/main-silver?cmd=changeset;node=4d394a5c7c7a
This does not seem to work very reliably, at least from Maven (if it matters). 7.1 Beta always prints a warning to console even in a plain Platform app: WARNING [org.netbeans.TopSecurityManager]: use of system property netbeans.home has been obsoleted in favor of InstalledFileLocator at org.netbeans.core.startup.CLIOptions.getUserDir(CLIOptions.java:294) (This is since fixed in trunk.) But return NbModuleSuite.createConfiguration(...). gui(false). failOnMessage(Level.WARNING). failOnException(Level.INFO). suite(); does not consistently fail; the warning is displayed in test output but the suite passes anyway. Putting a Thread.sleep(5000) in a test method does not help. Putting Exceptions.printStackTrace(new Exception()) in a test method usually makes it fail, but not consistently. Using gui(true) and doing some operations with jellytools.platform seems to make it fail consistently. Not sure what the problem is, but I am guessing it has something to do with buffering in TopLogging.