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 193227 - wrong place of unit test
Summary: wrong place of unit test
Status: REOPENED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Solaris
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 12:05 UTC by Alexander Simon
Modified: 2014-04-14 14: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 Alexander Simon 2010-12-10 12:05:25 UTC
Steps to reproduce:
- create quote application (Quote_1)
- build application using OSS
- create project from existing code, use folder of the application, custom mode, no build, project name (Quote_1_1)
- select application Quote_1 and add simple unit test.
Actual behavior:
- Test folder in Quote_1 is empty
Expected behavior:
- Test folder in Quote_1 contains created test
Comment 1 Thomas Preisler 2010-12-10 19:46:17 UTC
The problem is more generic than this. It happens for every file added, even plain c files, right?
Comment 2 Alexander Simon 2010-12-10 20:56:21 UTC
(In reply to comment #1)
> The problem is more generic than this. It happens for every file added, even
> plain c files, right?
I did not investigate a root cause.
Possible it have a lot of another steps to reproduce.
I suspect that problem in file owner query.
Comment 3 Thomas Preisler 2010-12-14 02:28:10 UTC
I (think) I fixed the general problem:

When a file is created from a wizard, it goes through some code (MakeTemplateListener.operationCreateFromTemplate)  that tries to figure out which project and which logical folder initiated the file creation. It called fileOwner in part to determine this. Here is what happens in case of an unmanaged project of a managed project:
- file is created from the managed project
- the unmanaged project detects a file has been created and automatically adds it to it self
- the logic that tries to determine who owns the file, now finds an existing owner and doesn't also add it to the managed project.

I think the fix is to allow multiple owners of the file. This is really the situation. The file should be added to both the managed and unmanaged project.

This issue should now be fixed. Didn't try the test folder issue as I don't understand the steps involved. It is probably fix. If not, please reopen and provide exact steps.
Comment 4 Thomas Preisler 2010-12-14 02:29:38 UTC
changeset:   184710:cbd8647f5617
tag:         tip
user:        Thomas Preisler <thp@netbeans.org>
date:        Mon Dec 13 18:28:41 2010 -0800
summary:     #193227 - wrong place of unit test
Comment 5 Quality Engineering 2010-12-15 06:19:09 UTC
Integrated into 'main-golden', will be available in build *201012150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/cbd8647f5617
User: Thomas Preisler <thp@netbeans.org>
Log: #193227 - wrong place of unit test
Comment 6 Thomas Preisler 2011-01-14 00:21:35 UTC
Reopening. The fix caused regression, see 194089 - File from created project shows in older proje.

The problem described here is not very common. Creating an unmanaged project from a managed project is not something 'real' users do. We developers may do this often to easily craete a project to work with, but it is not a common use case.