Added smoke test with spring session and Hazelcast
Comment From: mbhave
@kandulsh Thanks for the pull request! This has now been merged into main along with this polish commit which added some changes to assert on the number of sessions.
Comment From: vpavic
IMO the tests are more complicated then necessary as they are testing the sessions
endpoint itself (and that's already tested elsewhere). It would be enough to assert the presence of SessionsEndpoint
bean (and maybe expected session repository bean) in the application context - see the example from my own Spring Session samples.
Comment From: wilkinsona
Thanks for taking a look, Vedran. I prefer the test as currently written. At the level of a smoke test, I think it's better to check that a particular feature is working as a user would expect, rather than checking for the presence of some underlying components that enable that feature.
Comment From: vpavic
Fair enough - I didn't consider the user perspective to still be of primary interest here since these aren't considered samples so I focused on the actual touching points of Spring Boot's integration for Spring Session.
Comment From: mbhave
What @wilkinsona said is my preference for smoke tests as well. Even if they aren't meant to be consumed as samples, the tests should test what the high-level feature is to make sure nothing in between is broken.