Skip to content

Add smoke tests for Spring Session Redis/Mongo #28362

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

Closed
wants to merge 2 commits into from

Conversation

avillalain
Copy link

Add smoke tests that verify the correct behavior of the sessions
endpoint when using Spring Session with MongoDB and Redis.

See gh-28291

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 15, 2021
@mbhave
Copy link
Contributor

mbhave commented Oct 18, 2021

Thanks for the PR, @avillalain. Instead of the embedded servers we might be able to use @TestContainers. There is an example of this for MongoDB and Redis. Can you make this change?

Regarding the WebSession comment in #28291, that's a good point. I had not thought of adding equivalent smoke tests for WebSession. We have an existing one that uses MongoDB by default. We can enhance that to test actuator integration and add a separate one for Redis. We can definitely try and help figure out why something isn't working.

@mbhave mbhave added status: waiting-for-feedback We need additional information before we can continue type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 18, 2021
@mbhave mbhave added this to the 2.4.x milestone Oct 18, 2021
@mbhave mbhave modified the milestones: 2.4.x, 2.6.x Oct 18, 2021
@avillalain
Copy link
Author

Sure I can update the PR to account for the test containers, I saw some others were using the embedded approach and ended up following that route to keep consistency. I'll update the PR tomorrow with those changes.

I'll look into what you are point out for the web session too. Thanks

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 18, 2021
@vpavic
Copy link
Contributor

vpavic commented Oct 18, 2021

We can enhance that to test actuator integration and add a separate one for Redis.

There's no Actuator integration for WebSession as Spring Session does not (yet) offer the reactive equivalent of FindByIndexNameSessionRepository.

@avillalain
Copy link
Author

That explains why it wasn't working in my tests, I didn't know about that but I remember seeing some comments around this in some other issues, thanks, I'll deal with the changes to include Test containers instead of the embedded approach. I don't have that much experience on the reactive side of things

@avillalain
Copy link
Author

@vpavic also is there an issue for the web session integration?

@vpavic
Copy link
Contributor

vpavic commented Oct 18, 2021

There's #10827 but it's blocked until Spring Session provides the reactive equivalent of FindByIndexNameSessionRepository together with its first implementation.

@mbhave
Copy link
Contributor

mbhave commented Oct 18, 2021

Thanks @vpavic! I'd forgotten about that issue!

Angel L. Villalain Garcia added 2 commits October 18, 2021 21:48
Add smoke tests that verify the correct behavior of the sessions
endpoint when using Spring Session with MongoDB and Redis.

See spring-projectsgh-28291
Remove the usage of embedded mongo and redis in favor
of test containers
@avillalain
Copy link
Author

Thanks @mbhave for all the feedback provided, I finished updating the PR. It is now using test containers.

Quick question @vpavic is the issue you mentioned something complicated, would it be a suitable first timer kind of issue? I basically am fishing for another issue considering this is done in case there are no additional feedback.

@mbhave In case the issue is not suitable for a first timer, what could be another issue I could grab?

Thanks for your help and support

@mbhave mbhave removed the status: feedback-provided Feedback has been provided label Oct 19, 2021
@mbhave

This comment has been minimized.

@avillalain

This comment has been minimized.

@mbhave

This comment has been minimized.

mbhave pushed a commit that referenced this pull request Oct 19, 2021
Add smoke tests that verify the correct behavior of the sessions
endpoint when using Spring Session with MongoDB and Redis.

See gh-28362
@mbhave mbhave closed this in 718e727 Oct 19, 2021
@mbhave
Copy link
Contributor

mbhave commented Oct 19, 2021

@avillalain Thanks for making your first contribution to Spring Boot. This has been merged into main along with a minor polish commit.

@mbhave mbhave removed this from the 2.6.x milestone Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants