Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Emulated DataStores #85

Open
Kampfkarren opened this issue Jun 26, 2018 · 4 comments
Open

Emulated DataStores #85

Kampfkarren opened this issue Jun 26, 2018 · 4 comments

Comments

@Kampfkarren
Copy link
Contributor

Kampfkarren commented Jun 26, 2018

I would like to test out my data store module with lemur to make sure I don't seriously break something with a new update. I think lemur should have fake DataStores that perhaps just delay for a while on usage (#1), have emulated throttles, and sometimes just error like data stores actually do.

@LPGhatguy
Copy link
Owner

I like the idea of adding data stores, but I'm unsure what exactly they should do. Randomly throwing errors would cause havoc in tests, but at the same time, you shouldn't be hitting real data stores in tests!

I feel like to do this feature justice, you'd need to be able to configure data store failure, which would stop your tests from working inside Roblox itself.

@Kampfkarren
Copy link
Contributor Author

Randomly throwing errors would cause havoc in tests

Which is what normal data stores do, and why the wiki tells you to wrap your things in pcalls. Being able to configure it and not having it be random is a better idea (e.g. I may want to test what happens if data stores error 3 times in a row, but then start working again).

@Kampfkarren
Copy link
Contributor Author

buildthomas recently uploaded this repository, could this be what we want perhaps?

@buildthomas
Copy link
Contributor

I'd be happy to take suggestions for MockDataStoreService if needed for you guys to include it here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants