Skip to content

Commit

Permalink
Add deduplet ddg paths test
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
  • Loading branch information
rubenvp8510 committed Apr 8, 2020
1 parent 0f7ca18 commit ef0848d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/jaeger-ui/src/model/ddg/transformTracesToPaths.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,15 @@ describe('transform traces to ddg paths', () => {

expect(new Set(result)).toEqual(new Set([path]));
});

it('dedupled paths', () => {
const otherSpan = makeSpan('other-span', focalSpan);
otherSpan.hasChildren = false;
const trace1 = makeTrace([rootSpan, focalSpan, otherSpan], 'trace1');
const trace2 = makeTrace([rootSpan, focalSpan, otherSpan], 'trace2');
const { dependencies: result } = transformTracesToPaths(makeTraces(trace1, trace2), focalSvc);
const path = makeExpectedPath([rootSpan, focalSpan, otherSpan], trace1);
path.attributes.push({ key: 'exemplar_trace_id', value: trace2.data.traceID });
expect(new Set(result)).toEqual(new Set([path]));
});
});

0 comments on commit ef0848d

Please sign in to comment.