-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hazelcast + Cucumber - Running tests in IDE throws an ApplicationContextException #5555
Comments
Oh sweet got #5555! This issue was written in the stars... |
can you put your yo-rc.json plz ? |
Yes, I'm doing this all the time without any issue, so we need your configuration for that. |
I'm closing as we need to follow the same rules for everyone, but I'm really annoyed because it really looks like you know what you are doing, and found a real issue. |
This ticket has been closed as the guidelines are not followed. Tickets must follow our Guidelines, as mentioned in: We have also created a template on the "create a new ticket" page to help you follow those guidelines. |
Updated with config. Since I seen this regardless of monolith/microservice gradle/maven many Node and Java versions, etc. did not think it was related to my config. I seen it on MAC/Linux/Windows too. Also, happens with fresh project, don't touch any file... |
|
Indeed I can reproduce the error with your configuration -> as you can see, there is something specific with your |
I think the hazelcast clusteredHttpSession might be the culprit. It might be creating more than 1 hazelcast instance |
Yes this is probably due to a combinaison of Hazelcast (http session and/or 2nd level cache) and Cucumber. I'm updating the title. |
I enabled all the features that I thought I may use in the future. Did you think I was going to let any of your guys amazing work go to waste? |
I thought it was resolved by #2589 :( |
@tezcane : looks like you find the fix. Can you do a PR? I would just do this improvment, and do this at the beginning of the method: HazelcastInstance hazelCastInstance = Hazelcast.getHazelcastInstanceByName(<PROJECT NAME>);
if (hazelCastInstance != null) {
return hazelCastInstance;
} |
OK will do by end of the day. |
Overview of the issue
Running tests from IDE's built in test generator throws an Application Context Exception
Motivation for or Use Case
JHipster run's tests from command line just fine, but running tests from IDE's using their nice UI's that have colorful pass/fail and store test history don't work without my proposed fix (or possible other configurations not built into JHipster).
Reproduce the error
Related issues
I searched this issue here and outside but did not find an elegant solution.
Suggest a Fix
In CacheConfiguration.java:
Original code just has:
To be safer, we can enable this wart/workaround only to happen when the DEV/test? profile is run. After several attempts, I was not able to figure out how to detect when the project is running in DEV/test mode (vs. production).
JHipster Version(s)
Annoying issue exists for as long as I have used JHipster (over a year).
JHipster configuration
PS C:\Users\t\hapi\server\gtw> yo jhipster:info
Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folderEntity configuration(s)
entityName.json
files generated in the.jhipster
directoryls: no such file or directory: .jhipster/*.json
Browsers and Operating System
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
git version 2.12.0.windows.1
node: v7.8.0
npm: 4.2.0
yeoman: 1.8.5
yarn: 0.22.0
Docker version 1.13.1, build 092cba3
docker-compose version 1.11.1, build 7afaa436
(I love the advanced mark box feature.) :)
The text was updated successfully, but these errors were encountered: