Skip to content

Commit

Permalink
test: Flaky self-monitor metric outage tests (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
hisarbalik authored Aug 9, 2024
1 parent ccd9872 commit c1e5d6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/integration/istio/metrics_self_monitor_outage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var _ = Describe(suite.ID(), Label(suite.LabelSelfMonitoringMetricsOutage), Orde

objs = append(objs,
&metricPipeline,
telemetrygen.NewDeployment(mockNs, telemetrygen.SignalTypeMetrics, telemetrygen.WithRate(500_000), telemetrygen.WithWorkers(5)).WithReplicas(2).K8sObject(),
telemetrygen.NewDeployment(mockNs, telemetrygen.SignalTypeMetrics, telemetrygen.WithRate(10_000_000), telemetrygen.WithWorkers(50), telemetrygen.WithInterval("30s")).WithReplicas(2).K8sObject(),
)

return objs
Expand Down
7 changes: 7 additions & 0 deletions test/testkit/mocks/telemetrygen/telemetrygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ func WithSpanSize(spanSize int) Option {
}
}

// WithInterval Reporting interval
func WithInterval(duration string) Option {
return func(spec *corev1.PodSpec) {
spec.Containers[0].Args = append(spec.Containers[0].Args, "--interval")
spec.Containers[0].Args = append(spec.Containers[0].Args, fmt.Sprintf("%v", duration))
}
}
func NewPod(namespace string, signalType SignalType, opts ...Option) *kitk8s.Pod {
return kitk8s.NewPod(DefaultName, namespace).WithPodSpec(PodSpec(signalType, opts...)).WithLabel("app.kubernetes.io/name", DefaultName)
}
Expand Down

0 comments on commit c1e5d6d

Please sign in to comment.