It depends on what you are testing in this case, and whether if can be accomplished with unit tests. Maybe you can separate the test above into property tests on changeset functions and then a unit test on “list_users/0 returns all users”. However, if you do need to touch the database in your property tests (for example, if you use stateful property tests for state machines backed by postgres), then maybe try reducing the complexity of the tests (with :numtests, :max_size proper or propcheck options and sized macro) so that they don’t run for too long during development.
but 2.5 seconds for one test is way too long IMO
It might be okay if you leave them to run overnight on some remote testing server, then you’d have a higher confidence that the code works as expected.
UPDATE: There are similar options for stream data as well.






















