question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aalhossarycommented, Feb 5, 2020

@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.

0reactions
jsichicommented, Feb 4, 2020

@aalhossary please fix this per my comment above. This is blocking other PR’s from being merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Networkx: create a directed scale free graph with a given ...
I have looked at the generator for directed scale_free_graph. Here is an example of how to create three disconnected graphs using it:
Read more >
Scale-free networks are rare | Nature Communications
The scale-free hypothesis is defined most clearly for simple graphs, which have only one degree distribution. More complicated networks, e.g., a ...
Read more >
scale_free_graph — NetworkX 2.8.8 documentation
Returns a scale-free directed graph. Parameters: ninteger ... Build the scale-free graph starting from this initial MultiDiGraph, if provided. Returns:.
Read more >
DirectedScaleFreeGraphGenerat...
A generator for directed scale-free graphs. This generator creates a directed scale-free graph according to a power law, as described in Bollobás et...
Read more >
Directed Acyclic Graph - GitLab Docs
For example, you may have a specific tool or separate website that is built as part of your main project. Using a DAG,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found