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 257407 - Failing org.netbeans.modules.derby.spi.support.DerbySupportTest.testGetSystemHome
Summary: Failing org.netbeans.modules.derby.spi.support.DerbySupportTest.testGetSystem...
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 8.2
Hardware: PC Windows 8.1
: P1 normal (vote)
Assignee: matthias42
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2016-01-05 07:52 UTC by Jiri Skrivanek
Modified: 2016-01-07 13:01 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 Jiri Skrivanek 2016-01-05 07:52:41 UTC
Please, fix failing org.netbeans.modules.derby.spi.support.DerbySupportTest.testGetSystemHome.

at junit.framework.TestCase.assertTrue(TestCase.java:201)
	at org.netbeans.modules.derby.spi.support.DerbySupportTest.testGetSystemHome(DerbySupportTest.java:93)

http://test4u.cz.oracle.com/job/StableBTD-trunk/lastCompletedBuild/testReport/
Comment 1 matthias42 2016-01-05 22:44:42 UTC
I don't have access to test4u.cz.oracle.com, so this fix is based on a reproduction of the issue on a local windows installation.

A fix was committed as:

http://hg.netbeans.org/core-main/rev/eb34f7034515

The concrete issue was, that the AppData environment settings variable was not correctly mocked/overridden to enable the test. The unittest worked only if AppData environment was empty. The AppData environment entry can now be overriden by setting the system property "org.netbeans.modules.derby.spi.support.DerbySupport.overrideAppData". This is used in the unittest.

Additionally investigating this showed that the unittests did not work correctly if a system derby/javadb installation was found. This change is tested as:

- Windows 10, Oracle JDK 8
- Ubuntu 15.10, custom build of OpenJDK8 with JavaDB accessible
- Ubuntu 15.10, custom build of OpenJDK8 without JavaDB accessible
Comment 2 Quality Engineering 2016-01-07 02:23:46 UTC
Integrated into 'main-silver', will be available in build *201601070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/eb34f7034515
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #257407: Correct unittest for finding the derby home on windows and fix unittests to correctly run if derby/javadb is detected
Comment 3 Jiri Skrivanek 2016-01-07 13:01:09 UTC
Verified. Thanks.