Skip to content
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

Added function to create an empty session for testing #253

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kingledion
Copy link

@kingledion kingledion commented Jun 10, 2022

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated. (Not applicable, no tests existed)
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the nightly rustfmt (cargo +nightly fmt).

Overview

Added a Session::empty() function which instantiates an empty session to simplify unit testing.

None expected

Closes #252

@kingledion
Copy link
Author

I dunno what to say about this. I can't replicate these build failures locally, and they also appear to be in actix-cors which I didn't change.

I tested a variety of ways that edition 2021/2018 and rust 1.54/1.60 may have interacted to cause a dependency issues, and I can't find anything.

The download of hashbrown failure may be an availability issue? Perhaps the solution is to re-run pipeline? I don't see that I can trigger it again...

@JohnTitor
Copy link
Member

Nah, hashbrown started to use edition 2021 and it means we have to bump up our MSRV to 1.56. I'll handle it later so you don't have to worry about it.

@robjtede
Copy link
Member

robjtede commented Jul 3, 2022

#233 is a big change and will likely conflict with this MR but I'd like to get it merged first (very soon).

@robjtede robjtede added A-session Project: actix-session B-semver-minor labels Jul 19, 2022
@robjtede
Copy link
Member

I can believe that a function like this is still useful after the overhaul but I'd like to see a test added demonstrating one or two use cases.

@robjtede robjtede marked this pull request as draft July 23, 2022 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-session Project: actix-session B-semver-minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: implement Default or add a constructor to Session for testing
3 participants