Svatopluk Dedic created NETBEANS-5612:
-----------------------------------------

             Summary: Mocked module system in test runs
                 Key: NETBEANS-5612
                 URL: https://issues.apache.org/jira/browse/NETBEANS-5612
             Project: NetBeans
          Issue Type: Improvement
          Components: platform - Module System
            Reporter: Svatopluk Dedic


I've noticed that in some tests (currently: gradle) Module system complains in 
test logs that this or that module is not enabled. While *some* tests aim to 
check dynamic behaviour, i.e. when a plugin module/provider is/is not present, 
or test behaviour of module system and the config infrastructure itself,  
*most* of tests work in "static" environment they build on Classpath.

But as a simple call as *NbPrefences.forModule* may initialize ModuleManager 
and its dependency checks. It greatly prolongs test time and makes the logs 
full of garbage.

But mocking just Preferences won't be probably sufficient.

I think that there should be some 'mock' ModuleManager for tests, that could 
eventually serve Module objects whose state would be (for example) all enabled, 
as they are all active on the Classpath (and therefore their registrations in 
META-INF are read by classloaders). Such a support should be strictly opt-in 
for older code, and ideally opt-out for code with newer dependencies (assuming 
that just a fraction of tests actually check module's state).

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to