Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfBoundsException on generating sequence. #117

Closed
MortalFlesh opened this issue Jun 26, 2018 · 3 comments
Closed

OutOfBoundsException on generating sequence. #117

MortalFlesh opened this issue Jun 26, 2018 · 3 comments

Comments

@MortalFlesh
Copy link

MortalFlesh commented Jun 26, 2018

Hello,

I'm trying to test my Tuple class and I constantly get OutOfBoundsException : Evaluation ratio XXX is under the threshold 0.5.

But I also have test testShouldCreateTupleFromAnyArray (see test) which works fine. So I'm confused what am I doing wrong.

Broken test are here:
They are same but differs in the generation

Basically I want to test, that my Tuple could be created from any array, transformed to string and then parsed again to originally given array.
I would prefer the broken 2 test, since it is more complex and also easier to read.

Note: I don't want to test floats in the broken tests. As I do in the working test.

Any suggestions please?

Thank you

@MortalFlesh
Copy link
Author

MortalFlesh commented Jun 27, 2018

Well I finally end up with this:

try {
    // .. test ..
} catch (\OutOfBoundsException $e) {
    $this->markTestSkipped($e->getMessage());
}

(see test).

And at least most of the time test passes. But I still got the error sometimes...

@giorgiosironi
Copy link
Owner

Evaluation ratio errors are due to Eris generating a large number of inputs, but most of them being discarded, usually because they do not satisfy when() clauses. Can you try using the log listener to understand what values are being generated and possibly discarded?

@ilario-pierbattista
Copy link
Collaborator

No response. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants