Failing test for DirectedScaleFreeGraphGenerator
See original GitHub issue * JGraphT version: current master branch
* Java version (java -version)/platform: 8
Issue
Some of the tests (DirectedScaleFreeGraphGeneratorTest.testNoOutDegreeZero
) is failing during the continuous integration process. It seems like for some float values generated by the internal random number generator the resulting graph doesn’t satisfy the expected condition.
The error text:
[ERROR] Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.206 s <<< FAILURE! - in org.jgrapht.generate.DirectedScaleFreeGraphGeneratorTest [ERROR] testNoOutDegreeZero(org.jgrapht.generate.DirectedScaleFreeGraphGeneratorTest) Time elapsed: 0.088 s <<< FAILURE! java.lang.AssertionError: expected:<0> but was:<1> at org.jgrapht.generate.DirectedScaleFreeGraphGeneratorTest.testNoOutDegreeZero(DirectedScaleFreeGraphGeneratorTest.java:141)
[ERROR] Failures: [ERROR] DirectedScaleFreeGraphGeneratorTest.testNoOutDegreeZero:141 expected:<0> but was:<1>
Steps to reproduce (small coding example) The problem occurs only for specific random numbers, so it’s not possible to reproduce it.
Expected outcome
- We should look into the code logic and understand what the problem is.
- We should modify the tests so that we use the predefined seed in every test to avoid such issues in the future.
The PR has been merged recently, @aalhossary could you please look into this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@jsichi OK, I fixed it as per your request. However, I believe it is better to amend the test or remove it (the test) altogether.
@aalhossary please fix this per my comment above. This is blocking other PR’s from being merged.