You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 2.1.1 of the benchmark, execution of any test in the ms-jacis and ms-sync subprojects fails with the error:
Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
And root cause:
Caused by: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'embeddedStorageManager' defined in de.uniba.dsg.wss.service.MicroStreamTestConfiguration: Cannot register bean definition [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=microStreamTestConfiguration; factoryMethodName=embeddedStorageManager; initMethodName=null; destroyMethodName=(inferred); defined in de.uniba.dsg.wss.service.MicroStreamTestConfiguration] for bean 'embeddedStorageManager': There is already [Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=msConfiguration; factoryMethodName=embeddedStorageManager; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [de/uniba/dsg/wss/MsConfiguration.class]] bound.
Expected Behavior
Tests should complete successfully :)
Analysis
As far as I can tell, the tests cannot be initialized since the default configuration of the actual applications in those subprojects has a default bean for the MicroStream EmbeddedStorageManager, being defined in the MsConfiguration classes of those projects and the tests attempt to create a bean with the same name in the MicroStreamTestConfiguration classes.
I don't really understand why this causes an exception, since in my understanding the @TestConfiguration annotation in the MicroStreamTestConfiguration classes should result in the storage manager beans defined in the MsConfiguration classes to be overridden by the storage manager beans defined in MicroStreamTestConfiguration classes.
I assume this is a test configuration issue. When looking into this issue, we should maybe also look into whether the @SpringBootTest annotation is the appropriate approach in these projects, this spins up a full application, with all the beans. Might be overkill.
The text was updated successfully, but these errors were encountered:
Observed Behavior
In version 2.1.1 of the benchmark, execution of any test in the ms-jacis and ms-sync subprojects fails with the error:
And root cause:
Expected Behavior
Tests should complete successfully :)
Analysis
As far as I can tell, the tests cannot be initialized since the default configuration of the actual applications in those subprojects has a default bean for the MicroStream
EmbeddedStorageManager
, being defined in theMsConfiguration
classes of those projects and the tests attempt to create a bean with the same name in theMicroStreamTestConfiguration
classes.I don't really understand why this causes an exception, since in my understanding the
@TestConfiguration
annotation in theMicroStreamTestConfiguration
classes should result in the storage manager beans defined in theMsConfiguration
classes to be overridden by the storage manager beans defined inMicroStreamTestConfiguration
classes.I assume this is a test configuration issue. When looking into this issue, we should maybe also look into whether the
@SpringBootTest
annotation is the appropriate approach in these projects, this spins up a full application, with all the beans. Might be overkill.The text was updated successfully, but these errors were encountered: