mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +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:
		@@ -264,10 +264,10 @@ func (tc *CustomMetricTestCase) Run() {
 | 
			
		||||
	defer monitoring.CleanupDescriptors(gcmService, projectID)
 | 
			
		||||
 | 
			
		||||
	err = monitoring.CreateAdapter(monitoring.AdapterDefault)
 | 
			
		||||
	defer monitoring.CleanupAdapter(monitoring.AdapterDefault)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		framework.Failf("Failed to set up: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
	defer monitoring.CleanupAdapter(monitoring.AdapterDefault)
 | 
			
		||||
 | 
			
		||||
	// Run application that exports the metric
 | 
			
		||||
	err = createDeploymentToScale(tc.framework, tc.kubeClient, tc.deployment, tc.pod)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user