diff --git a/pkg/drawio/layoutOverlap.go b/pkg/drawio/layoutOverlap.go index 2a8ac8ca9..829a38c4d 100644 --- a/pkg/drawio/layoutOverlap.go +++ b/pkg/drawio/layoutOverlap.go @@ -190,6 +190,10 @@ func (lyO *layoutOverlap) potentialBypassPoints(srcPoint, dstPoint, middlePoint deltaX, deltaY := (srcPoint.X - dstPoint.X), (srcPoint.Y - dstPoint.Y) disXY := int(math.Sqrt(float64(deltaX)*float64(deltaX) + float64(deltaY)*float64(deltaY))) BPs := []point{} + if disXY <= 2*minSize { + // the points are too close, there is no point to bypass. + return BPs + } for i := 0; i < nPotentialBP; i++ { verticalVectorSize := pow(-1, i) * (1 + i/2) * iconSize verticalVectorX := verticalVectorSize * deltaY / disXY diff --git a/pkg/ibmvpc/analysis_output_test.go b/pkg/ibmvpc/analysis_output_test.go index 435c2a673..d6ac990b6 100644 --- a/pkg/ibmvpc/analysis_output_test.go +++ b/pkg/ibmvpc/analysis_output_test.go @@ -513,13 +513,15 @@ var tests = []*testfunc.VpcAnalysisTest{ }, GroupingType: vpcmodel.GroupingNoConsistencyEdges, }, - // commented until https://github.com/np-guard/vpc-network-config-analyzer/issues/847 is fixed - // { - // InputConfig: "iks_workers_large", - // UseCases: []vpcmodel.OutputUseCase{vpcmodel.AllEndpoints}, - // Grouping: true, - // Format: vpcmodel.DRAWIO, - // }, + { + VpcTestCommon: testfunc.VpcTestCommon{ + InputConfig: "iks_workers_large", + UseCases: []vpcmodel.OutputUseCase{vpcmodel.AllEndpoints}, + Format: vpcmodel.DRAWIO, + }, + GroupingType: vpcmodel.GroupingNoConsistencyEdges, + }, + // Grouping test of identical names different resources and thus different UIDs that should not be merged { VpcTestCommon: testfunc.VpcTestCommon{