Testing the graph cache identifier involved randomly deleting an edge from a pegasus graph and testing that the identifier would change. Since the graph identifier is a sha256 hash of a serialized form of the graph, this should be a simple test, right? Oops. Only, roughly 1/15th of the time, the randomly-chosen edge represents an odd coupler -- an edge which is ignored by the busclique algorithm.
So I've split the test into two -- it first filters the edges into two sets (odd edges and relevant edges) and then tests that the identifier changes when a relevant edge is deleted and does not change when an odd edge is deleted. In the chance that we ever account for odd edges in the busclique algorithm, the bifurcated test will rear its head and we can update it from there.
Testing the graph cache identifier involved randomly deleting an edge from a pegasus graph and testing that the identifier would change. Since the graph identifier is a sha256 hash of a serialized form of the graph, this should be a simple test, right? Oops. Only, roughly 1/15th of the time, the randomly-chosen edge represents an odd coupler -- an edge which is ignored by the busclique algorithm.
So I've split the test into two -- it first filters the edges into two sets (odd edges and relevant edges) and then tests that the identifier changes when a relevant edge is deleted and does not change when an odd edge is deleted. In the chance that we ever account for odd edges in the busclique algorithm, the bifurcated test will rear its head and we can update it from there.