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 94130 - j2ee/ddapi test failures
Summary: j2ee/ddapi test failures
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords: TEST
Depends on:
Blocks: 93294
  Show dependency tree
 
Reported: 2007-02-02 21:04 UTC by Erno Mononen
Modified: 2009-11-10 06:50 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 Erno Mononen 2007-02-02 21:04:48 UTC
The j2ee/ddapi tests started failing after the recent change in the test 
infrastructure, all tests fail because the web.xml file used in the tests is not 
found. Not sure what is causing the problem, the tests pass locally for me.
Comment 1 pzajac 2007-02-15 16:08:22 UTC
I'm sorry for so late answer. I found the problem. test/build.xml contains:

    <target name="init" depends="default.init">
        <delete file="${basedir}/unit/data/web.xml"/>
        <delete file="${basedir}/unit/data/invalid/web.xml"/>
        <copy file="${basedir}/unit/data/web_org.xml"
tofile="${basedir}/unit/data/web.xml"/>
        <copy file="${basedir}/unit/data/invalid/web_org.xml"
tofile="${basedir}/unit/data/invalid/web.xml"/>
    </target>

You depends on nbcvs structure, therefore it doesn't work. Please 
initialize temporary files in code of TestCases. You can you  
NbTestCase.getDataDir() to access to copy of unit/data or use

NbTestCase.getWorkdir() to access to temporary files. The workdir is stored
after test execution and you can see it in html result.  

Comment 2 Erno Mononen 2007-02-28 09:46:57 UTC
Thanks for looking into this, should be fixed in trunk now.

http://j2ee.netbeans.org/source/browse/j2ee/ddapi/test/build.xml?r1=1.2&r2=1.3

http://j2ee.netbeans.org/source/browse/j2ee/ddapi/test/unit/src/org/netbeans/
modules/j2ee/dd/api/web/DDApiTest.java?r1=1.5&r2=1.6