Skip to content

Getting Mongo::Error::SessionNotMaterialized when trying to run tests on this repo #5446

Answered by alexbevi
jeffsaremi asked this question in Q&A
Discussion options

You must be logged in to vote

@jeffsaremi, server sessions are only available in replica sets or sharded clusters. If you're testing locally you could spin up a single node replica set (ex: mongod --dbpath data --replSet rs0), connect to it via the mongosh shell and run rs.initate() to initialize the set then run the tests ... but this shouldn't be necessary.

I tried just starting a mongod in standalone mode and running the full suite with rake and didn't get any errors. Can you share the exact commands you ran to get this output? I'm not sure what test.rb refers to in this case.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@jeffsaremi
Comment options

Answer selected by jeffsaremi
Comment options

You must be logged in to vote
3 replies
@jeffsaremi
Comment options

@jeffsaremi
Comment options

@alexbevi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants