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 253570 - Important Files for Codeception?
Summary: Important Files for Codeception?
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Codeception (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 07:31 UTC by Tomas Mysik
Modified: 2015-07-25 01:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a patch for Important Files (10.43 KB, patch)
2015-07-23 01:52 UTC, junichi11
Details | Diff
patch (11.09 KB, patch)
2015-07-23 22:01 UTC, junichi11
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2015-07-20 07:31:37 UTC
Perhaps we could consider adding Important Files [1] for Codeception. Currently, the "codeception.yml" file comes to my mind. Any other ideas? Junichi, are you interested in creating a patch? I can easily do it myself, of course; if you want to do it, as an example see any ImportantFilesImpl; javascript.karma does not use the SPI support class, maybe it could be helpful for you.

Thanks.
[1] org.netbeans.modules.php.spi.phpmodule.ImportantFilesImplementation
Comment 1 junichi11 2015-07-20 11:23:15 UTC
(In reply to Tomas Mysik from comment #0)
> Perhaps we could consider adding Important Files [1] for Codeception.
> Currently, the "codeception.yml" file comes to my mind. 

It's a nice idea.

>Any other ideas?

"*.suite.yml" files? these are each test suite configuration files.

> Junichi, are you interested in creating a patch? I can easily do it myself,
> of course; if you want to do it, as an example see any ImportantFilesImpl;
> javascript.karma does not use the SPI support class, maybe it could be
> helpful for you.

I'll try it, If I can't it, let you know.

Thanks!
Comment 2 junichi11 2015-07-23 01:52:10 UTC
Created attachment 154804 [details]
a patch for Important Files

Perhaps, it will be complex to add suite configuration files. So, I added only the "codeception.yml" to it. 
Could you review please it?

Thanks.
Comment 3 Tomas Mysik 2015-07-23 05:52:15 UTC
Patch seems fine. The only thing to improve is:

private boolean initialized

This field should be volatile or use synchronization for adding listener (the getFiles() method can be called from any thread).

Thanks!
Comment 4 junichi11 2015-07-23 22:01:17 UTC
Created attachment 154831 [details]
patch

My code was not Thread-Safe. Thanks for catching it.
I've just added volatile to the initialized field.

Thanks!
Comment 5 Tomas Mysik 2015-07-24 07:22:56 UTC
Patch applied (I just added a comment to volatile field). Thanks a lot!

http://hg.netbeans.org/web-main/rev/70c0b8698bc8
Comment 6 junichi11 2015-07-24 09:50:56 UTC
Thanks, Tomas!
Comment 7 Quality Engineering 2015-07-25 01:16:18 UTC
Integrated into 'main-silver', will be available in build *201507250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/70c0b8698bc8
User: Tomas Mysik <tmysik@netbeans.org>
Log: #253570 - Important Files for Codeception?

Patch contributed by junichi11@netbeans.org.