lemur icon indicating copy to clipboard operation
lemur copied to clipboard

Emulated DataStores

Open Kampfkarren opened this issue 6 years ago • 4 comments

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.

Kampfkarren avatar Jun 26 '18 00:06 Kampfkarren

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.

LPGhatguy avatar Jun 26 '18 00:06 LPGhatguy

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 avatar Jun 26 '18 00:06 Kampfkarren

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

Kampfkarren avatar Jun 28 '18 16:06 Kampfkarren

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

buildthomas avatar Aug 14 '18 17:08 buildthomas