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 241660 - Failing tests on newly created NBP maven application
Summary: Failing tests on newly created NBP maven application
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 20:07 UTC by markiewb
Modified: 2014-02-12 10:31 UTC (History)
0 users

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 markiewb 2014-02-10 20:07:12 UTC
http://services.netbeans.org/synergy/client/app/#/case/3904/suite/1493/v/1

1. Create new Maven NetBeans Platform application project (Nbapp)
2. Clean and build (on Nbapp-app)

ACTUAL: Builds fails because of failing test.

-------------------------------------------------------------------------------
Test set: com.mycompany.nbapp.ApplicationTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.231 sec <<< FAILURE!
testApplication(com.mycompany.nbapp.ApplicationTest)  Time elapsed: 0.006 sec  <<< FAILURE!
junit.framework.AssertionFailedError: NbModuleSuite has been started with failOnMessage(WARNING) and failOnException(INFO). The following failures have been captured:
[java.util.prefs] THREAD: main MSG: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

	at org.netbeans.junit.internal.NbModuleLogHandler.checkFailures(NbModuleLogHandler.java:218)
	at org.netbeans.junit.NbModuleSuite$NbTestSuiteLogCheck.runTest(NbModuleSuite.java:1604)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:944)
	at org.netbeans.junit.NbModuleSuite$S.access$100(NbModuleSuite.java:667)
	at org.netbeans.junit.NbModuleSuite$S$1.protect(NbModuleSuite.java:688)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:684)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	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)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:113)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

EXPECTED: NetBeans generates a working application, which can be build.

Product Version: NetBeans IDE Dev (Build 201402090001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b127
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 markiewb 2014-02-10 20:08:54 UTC
FYI: "Skip tests for goals not directly related to testing" is unchecked
Comment 2 Milos Kleint 2014-02-11 09:49:54 UTC
this line basically explains the behaviour:

NbModuleSuite has been started with failOnMessage(WARNING) and failOnException(INFO)

That's defined in the ApplicationTest class file.

The setup is highly dependent on the version of netbeans being used and modules being part of the application
Comment 3 Milos Kleint 2014-02-12 10:31:23 UTC
for me personally (your mileage may vary due to various reasons) the simple click through  the application and build fails on 7.4 but works on all of 7.2, 7.3 and 8.0-beta.
7.4 fails due to this message
WARNING [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading failed! Trying fallback resolver. 

which is turned into INFO in 80-beta.


closing as fixed (as it appears to work for me with 80-beta) however as I said, your case could be different, please paste your WARNING/ERROR messages)

I suppose for post-80 the ultimate solution could be to get rid of the NbModuleSuite configuration that makes the execution fail. Not for 8.0 due to time constraints (close to code freeze and the issue needs archetype re-release)