Comments (9)
We use ContextCustomizerFactory which is not compatible with context reuse.
Yup exactly, was having some fun looking at spring docs and sprint-test context cache implementation. The lambda that is being returned from SqlTestContainersSpringContextCustomizerFactory seem to be throwing the hashcode which is causing the context recreation.
I am trying to replace the lambda with an object and see how the cache reacts...
Will keep you posted...
from generator-jhipster.
@mshima, I am willing to contribute to this issue and have been doing some reading,
context-reload-sof
github issue related to this
Based on spring.io, contexts are cached and re-used as long as context configuration remains unique. I am trying to figure out what this really means from jhipter's backend implementation.
Let me know if you like me to move forward, I see you have made some changes too...
from generator-jhipster.
@dwarakaprasad great.
I would say that #21853 is the start point.
We use ContextCustomizerFactory which is not compatible with context reuse.
from generator-jhipster.
That's interesting, we should calculate the hashcode in customizers then.
from generator-jhipster.
@mshima ng-default with h2 dev has got about 20 - 30 sec faster (from 13 to 5 re-loads). See reference.
You can drop the DirtiesContext from AuthenticationIntegrationTest.java as well.
For some reason your changes does not seem to show any loading optimization.
from generator-jhipster.
For some reason your changes does not seem to show any loading optimization
got it, the returned ContextCustomizer needs the overridden hashCode method, your impl seems to be adding it to the ContextCustomizerfactory rather. See my reference impl.
from generator-jhipster.
With the ContextCustomizer hashCode in place the hash conflict is happing in ImportsContextCustomizer.
ImportsContextCustomizer is quite complex and hard to debug.
I give up for now.
from generator-jhipster.
Maybe it's related on how the TestContainerCustomizer is implemented.
from generator-jhipster.
Maybe it's related on how the TestContainerCustomizer is implemented.
I was able to get the non-testContainer based test ("devDatabaseType": "h2Memory") to be loaded optimally (see this), but not for the one using testContainers. I am getting 'liquibase' bean creation error as the spring.dataSource.url seems to be going in as null from TestContainerCustomizer, i.e. the DatasourceProperties object in the LiquibaseConfiguration.java is empty and nothing from the Customizer is propagated.
from generator-jhipster.
Related Issues (20)
- DTO classes are generated without javadoc comments and without @Schema HOT 1
- Unnecessary imports added in 7.9.4 HOT 6
- [Angular] Console warnings happen when running tests in `main.component.spec.ts`
- LazyInitializationException for authorities with Elasticsearch HOT 3
- Error creating a basic application with Jhipster 8.3.0 HOT 4
- Unable to start application generated with jhipster 8.3.0 in prod profile HOT 7
- Deleting a Parent isn't working when it has a Child in a one-to-one relationship HOT 4
- Vue: Blank Parent column in Child entity list for both one-to-one and many-to-one relationships HOT 7
- Migrate React to Vite HOT 2
- extract client/vite generator and add support to react.
- Add spring-boot/graalvm generator HOT 1
- org.glassfish.jaxb.runtime.v2.util.StackRecorder: null HOT 1
- Release 8.4.0 HOT 6
- Is the structure of subgenerators a bit fragmented now? HOT 2
- Custom column id as UUID for oracle database
- Use of Spring Boot Parent may break spring.profiles.active HOT 7
- Options generation annotations on entities HOT 1
- Jhipster V794: Entity Creation Fails with Error : An error occured while running jhipster:entity#loadRelationShips HOT 4
- JHipster 8.4.0 Kubernetes Generator Issue HOT 3
- Node throw er; after npm start HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-jhipster.