Build: #2349 was successful Changes by teleivo <teleivo@users.noreply.github.com>
Code commits
openmrs-core
-
teleivo <teleivo@users.noreply.github.com> 7481583d88a189d795cae83767536f9caec26cbd
TRUNK-5816 Run StartModuleAnnotationTest
tests in folder test are not run. Not sure when this test was ever run.
See surefire exclusions for why.
We cannot run a BaseContextSensitive with a BaseModuleContextSensitive
test in the same package. You can run it in isolation but as soon as you
add another test extending the other base class you get
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.921 s <<< FAILURE! - in org.openmrs.annotation.StartModuleAnnotationTest
[ERROR] shouldStartModules Time elapsed: 0.003 s <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
...
Caused by: org.hibernate.cache.CacheException:
net.sf.ehcache.CacheException: Another CacheManager with same name 'hibernateCache' already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ]
Caused by: net.sf.ehcache.CacheException:
Another CacheManager with same name 'hibernateCache' already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ]
Both will want to create an applicationContext with most likely a lot of
the same beans. The cause here is the duplicate ehCache with the same
name- api/src/test/java/org/openmrs/annotation/StartModuleAnnotationTest.java (version 7481583d88a189d795cae83767536f9caec26cbd)
- api/src/test/java/org/openmrs/test/StartModuleAnnotationTest.java (version 7481583d88a189d795cae83767536f9caec26cbd)