mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
parent
475cf748aa
commit
d72a93e040
2 changed files with 7 additions and 6 deletions
|
@ -156,8 +156,8 @@ public final class Graph implements SourceComponent, Hashable {
|
|||
|
||||
// Build these lists here since we do mutate the graph in place later
|
||||
// This isn't strictly necessary, but makes things less confusing
|
||||
Collection<Vertex> fromLeaves = allLeaves().map(combineResult.oldToNewVertices::get).collect(Collectors.toSet());
|
||||
Collection<Vertex> toRoots = otherGraph.roots().map(combineResult.oldToNewVertices::get).collect(Collectors.toSet());
|
||||
Collection<Vertex> fromLeaves = allLeaves().map(combineResult.oldToNewVertices::get).collect(Collectors.toList());
|
||||
Collection<Vertex> toRoots = otherGraph.roots().map(combineResult.oldToNewVertices::get).collect(Collectors.toList());
|
||||
|
||||
return combineResult.graph.chain(fromLeaves, toRoots);
|
||||
}
|
||||
|
|
|
@ -83,10 +83,11 @@ public class GraphTest {
|
|||
|
||||
@Test
|
||||
public void complexConsistencyTest() throws InvalidIRException {
|
||||
Graph g1 = IRHelpers.samplePipeline().getGraph();
|
||||
Graph g2 = IRHelpers.samplePipeline().getGraph();
|
||||
|
||||
assertEquals(g1.uniqueHash(), g2.uniqueHash());
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
Graph g1 = IRHelpers.samplePipeline().getGraph();
|
||||
Graph g2 = IRHelpers.samplePipeline().getGraph();
|
||||
assertEquals(g1.uniqueHash(), g2.uniqueHash());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue