mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #103252 from pacoxu/defer-fix
custom-metrics: do cleanup even if the creation is not full succeed
This commit is contained in:
commit
858895da81
@ -264,10 +264,10 @@ func (tc *CustomMetricTestCase) Run() {
|
|||||||
defer monitoring.CleanupDescriptors(gcmService, projectID)
|
defer monitoring.CleanupDescriptors(gcmService, projectID)
|
||||||
|
|
||||||
err = monitoring.CreateAdapter(monitoring.AdapterDefault)
|
err = monitoring.CreateAdapter(monitoring.AdapterDefault)
|
||||||
|
defer monitoring.CleanupAdapter(monitoring.AdapterDefault)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
framework.Failf("Failed to set up: %v", err)
|
framework.Failf("Failed to set up: %v", err)
|
||||||
}
|
}
|
||||||
defer monitoring.CleanupAdapter(monitoring.AdapterDefault)
|
|
||||||
|
|
||||||
// Run application that exports the metric
|
// Run application that exports the metric
|
||||||
err = createDeploymentToScale(tc.framework, tc.kubeClient, tc.deployment, tc.pod)
|
err = createDeploymentToScale(tc.framework, tc.kubeClient, tc.deployment, tc.pod)
|
||||||
|
Loading…
Reference in New Issue
Block a user