Open lehadnk opened 2 weeks ago
The default seed is the current timestamp, precise to the current second, so that's why you are getting the same results there.
An easy workaround is to have a global faker instance that you re-use for all tests.
I guess what we need is some feature to control the data seed identifier or at least some random identifier in it.
It is already possible with faker.NewWithSeed()
Hello! I'm using faker to generate some random data for my unit tests, and it appears that when tests are run too fast on my CPU I'm getting the same data seed in two different tests, resulting in faker generating the same emails for two different users in two different tests:
I guess what we need is some feature to control the data seed identifier or at least some random identifier in it.