khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
1.01k stars 37 forks source link

Unit test session deregistration #232

Open ecton opened 2 years ago

ecton commented 2 years ago

In 062b5905d34b3c4ccd0e712e3427a7a1b4eee848, I added authenticated session deregistration from the Client. I've manually verified things are working correctly currently, but unit tests should be written.

For local sessions, we might need to add APIs to query what sessions are authenticated. This could be a good public API to add to StorageConnection.

For client sessions, it can be tested today if you have a reference to the server by getting the ConnectedClient instance, and asking for the session by id after dropping the remaining authenticated client. However, if we go the route of adding a public API to enumerate authenticated sessions, we wouldn't need to special-case this unit test on a per-platform basis.