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
Add smoke tests to validate use of the starter in a vanilla application #51
Comments
@snicoll - Will think on this. Thanks for the feedback. |
Correction to:
To my knowledge, SBDG, through transitive dependencies, only brought in the It is true that SBDG has a direct dependency on SDG, which in turn has a dependency on the Never-the-less, I feel that having smoke tests to catch/prevent these type of situations going forward are important, even if it is largely due some transitive dependency (e.g. Apache Geode I take full responsibility. |
I meant to write |
…ated) with the Spring Initializer at https://start.spring.io. Resolves spring-projectsgh-51.
…ated) with Spring Initializer at https://start.spring.io. Resolves spring-projectsgh-51.
…A and an HSQLDB database as the application System of Record (SOR) and Apache Geode as the caching provider in Spring's Cache Abstraction. Resolves spring-projectsgh-51.
I have added 2 Smoke Tests to the SBDG project.
While this effort is not an exhaustive list, it does cover the 2 scenarios highlighted above to a degree. Also, as any new problems or scenarios come to our attention, we will continue to add additional smoke tests to cover as many UCs as possible and ensure SBDG is behaving correctly in all contexts, playing nicely with other Spring Boot modules, working for the intended UCs, and so on and so forth. Therefore, please do not take the closure of this Issues as final. It is just the beginning of much more. |
…A and an HSQLDB database as the application System of Record (SOR) and Apache Geode as the caching provider in Spring's Cache Abstraction. Resolves spring-projectsgh-51.
…oot application classpath. Experiment with adding SD for Apache Geode's @region mapping annotation as well as SD MongoDB's @document mapping annotation and the effects on Spring Boot's auto-configuration support for SD Repositories when multiple data store providers are on the Spring Boot application classpath. Resolves spring-projectsgh-51.
Thanks for this @jxblum, I had a quick look at this so I might be missing something. Can you please share how that zip file in In the current form and, as far as I understood, I can see that it uses Have you considering having a project with the starter (in the latest snapshot form) and run tests against that. The smoke tests in Spring Boot work that way and since they inherit from the current build, they can use whatever dependency that is managed in the project, i.e. these dependencies bring the code that was just built. In your case, just providing the starter is all that would be required. Another smoke test project that brings the web starter could validate the integration with the rest of the ecosystem (though secondary). |
Hi @snicoll - Thanks for the feedback.
Good question! It will be manually updated for now. Presently, I simply wanted to put together any kind of test, which was better than having no tests. So, I went to start.spring.io, generated a "Spring for Apache Geode" Spring Boot This is accomplished by 1) declaring the repos from which the artifact (e.g. Of course, now that I think about it, not sure if that quite does the same thing?? I then set the "version" to match whatever version the SBDG project is currently building at (e.g. The version (e.g. Also, if the contents of the generated Spring Initializer product ever changes, then it won't quite be testing what Initializer is doing when a user generates a "Spring for Apache Geode" project, :( Let me digest your additional comments more and then figure out next steps. For now, I just wanted to share what my original (flawed) thinking was. |
I verified and the I also tested what would happen if I superfically changed the "
This also happens when I run the entire project build. Everything builds fine up to the Smoke Tests (the last thing to run), which then fail.
I am an idiot. However, what this does mean is, the build is properly trying to resolve the I clearly need to rethink this, though. |
If you don't have a particular opinion, I'd align to what we've done for our smoke tests in Spring Boot (link above). The setup from start.spring.io is not what we should be testing here IMO (it's our problem making sure that if we generated a Rather we should have a simple If dependency management is configured as it should in your gradle build, you could just refer to your starter without a version and it will use whatever bits were built locally. That way, if a regression occurs in the code, the smoke test can break and prevent the bits to be deployed on a repo. I don't know enough gradle to help you investigate that part though, sorry. |
Thanks for the feedback and ideas/thoughts, @snicoll. I will think on this more and follow-up with comments later. |
In the recent past, a number of issues were discovered adding the
spring-geode-starter
to a vanilla Spring Boot application. Given that this project built successfully and a release was made with those issues, I think a number of integration/smoke tests are missing.The two recent examples I have in mind are:
spring-mvc
andservlet-api
were present in the classpath, triggering an embedded application server bootstrap.While both theses issues are actually located outside of this project (and workarounds have been swiftly applied), the integration in a Spring Boot application was broken and having an automated way of discovering such issue prior of a release is necessary.
I don't know how easy that's going to be. Perhaps testcontainers can help to make sure a vanilla geode instance is running for such tests.
The text was updated successfully, but these errors were encountered: