
|
If you were logged in you would be able to see more operations.
|
Google issue summary
|
|
|
| Resolution Date: |
19/10/07 18:00
|
| Require Callback: |
No
|
| Participants: |
Georges Racinet
|
| Tags: |
|
|
The current deploy() method looks for xml contributions in the current classpath. First one hence wins. To be sure which resource is actually loaded it led everyone to override basic xml configuration that doesn't need to in their integration JUnit tests.
Here are the use cases NXRuntimeTestCase should implement (summary of discussion with Bogdan S)
- deploy a whole jar with its OSGI-INF configuration: typical for an integration test: we want e.g, the schema service to be available in the same way it is in the application. Maybe follow dependencies, here, or at least *loudly* stop in case some are missing
- control which jars are actually deployed: we might have a dependency to core packages to get an interface/class and still not want to construct a full Nuxeo Core instance
- override the configuration that sits in the jar (we could use test/resources as an equivalent to /config in nuxeo.ear, but this has to stay manual). Typical use-case: fake ram repository,
- true unit tests can go on using
- I don't think we need to load test resources from a jar in dependencies: we've always used separated *-test packages for generic helpers; they can provide resources for their test clients in src/main/resources
A good deal of the problems with non nxruntime resources (schemas etc) can be solved, I guess, by the fact that they would be now deployed where they are defined, as normal (non test) resources, if one deploys the whole jar that usually defines them.
|
|
Description
|
The current deploy() method looks for xml contributions in the current classpath. First one hence wins. To be sure which resource is actually loaded it led everyone to override basic xml configuration that doesn't need to in their integration JUnit tests.
Here are the use cases NXRuntimeTestCase should implement (summary of discussion with Bogdan S)
- deploy a whole jar with its OSGI-INF configuration: typical for an integration test: we want e.g, the schema service to be available in the same way it is in the application. Maybe follow dependencies, here, or at least *loudly* stop in case some are missing
- control which jars are actually deployed: we might have a dependency to core packages to get an interface/class and still not want to construct a full Nuxeo Core instance
- override the configuration that sits in the jar (we could use test/resources as an equivalent to /config in nuxeo.ear, but this has to stay manual). Typical use-case: fake ram repository,
- true unit tests can go on using
- I don't think we need to load test resources from a jar in dependencies: we've always used separated *-test packages for generic helpers; they can provide resources for their test clients in src/main/resources
A good deal of the problems with non nxruntime resources (schemas etc) can be solved, I guess, by the fact that they would be now deployed where they are defined, as normal (non test) resources, if one deploys the whole jar that usually defines them.
|
Show » |
|
It's almost fully compatible with the previous iteration of NXRuntimeTestCase (see rev 25541)
Sample usage in nuxeo-platform-search-api: rev 25544
There are quite a bunch of new stacktraces in the logs, but that's because the runtime's deployment is a bit too wide,