jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.69k stars 710 forks source link

Expose `simulate`, `perfect`, etc from jepsen.generator-test? #472

Closed stevana closed 3 years ago

stevana commented 4 years ago

I'd like to be able to test my generators inside my project, but I couldn't figure out how to import a namespace from the test/ directory (simulate et al are defined in jepsen.generator-test currently), is it even possible?

If not, could we move simulate, perfect, etc into some namespace that can be imported from other projects?

aphyr commented 4 years ago

I think that's a good idea. I'd suggest moving them to a new namespace jepsen.generators.test. Simulate can definitely be moved--that feels pretty solid at this point. perfect and others have some kinda quirky API choices--notably around choosing to return just invocations as opposed to complete histories--that might need to change later (which is why I didn't make them a part of the generators namespace yet), but so long as we document they might break later I think that's fine.