Closed jnormington closed 6 years ago
I played around a bit and think that the locked source is most likely the best compromise for now.
Thanks @untoldwind, Just a note we also need to add it to https://github.com/leanovate/gopter/blob/master/test_parameters.go#L30
which I missed in the original fix/issue but have since fixed in our fork
Tanks, obviously missed that as well.
Hi @untoldwind,
We've recently started to use gopter (which is a great project thanks) and came across a bug when using multiple workers and a failure occurred it wouldn't return the full test result error, labels or prop args, making hard to understand what generated value caused the test failure. Which I raised a new PR for review: https://github.com/leanovate/gopter/pull/36
However that exposed another bug unfortunately with math/rand. Essentially rand.New(rand.NewSource(..)) is not thread safe when calling for new rand Int - running across multiple workers and you can validate with this smallest example - it doesn't happen consistently but happens regularly
https://gist.github.com/jnormington/a832472edf9fa0db020ebd028b7849b9 Issues on golang;
I've looked at this and there are a few solutions;
There are a few problems with 1 & 2 though
We've updated our vendored version and works great.
So I wanted to get your thoughts on the issue and whether you had any ideas or was happy with this approach or if you had other concerns I haven't thought of. Below is an example of point 3