mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	fix
This commit is contained in:
		@@ -1427,7 +1427,7 @@ func startCollectingMetrics(tCtx ktesting.TContext, collectorWG *sync.WaitGroup,
 | 
				
			|||||||
		collector := collector
 | 
							collector := collector
 | 
				
			||||||
		err := collector.init()
 | 
							err := collector.init()
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return nil, nil, fmt.Errorf("op %d: Failed to initialize data collector: %w", opIndex, err)
 | 
								return nil, nil, fmt.Errorf("failed to initialize data collector: %w", err)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		tCtx.TB().Cleanup(func() {
 | 
							tCtx.TB().Cleanup(func() {
 | 
				
			||||||
			collectorCtx.Cancel("cleaning up")
 | 
								collectorCtx.Cancel("cleaning up")
 | 
				
			||||||
@@ -1443,7 +1443,7 @@ func startCollectingMetrics(tCtx ktesting.TContext, collectorWG *sync.WaitGroup,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func stopCollectingMetrics(tCtx ktesting.TContext, collectorCtx ktesting.TContext, collectorWG *sync.WaitGroup, threshold float64, tms thresholdMetricSelector, opIndex int, collectors []testDataCollector) ([]DataItem, error) {
 | 
					func stopCollectingMetrics(tCtx ktesting.TContext, collectorCtx ktesting.TContext, collectorWG *sync.WaitGroup, threshold float64, tms thresholdMetricSelector, opIndex int, collectors []testDataCollector) ([]DataItem, error) {
 | 
				
			||||||
	if collectorCtx == nil {
 | 
						if collectorCtx == nil {
 | 
				
			||||||
		return nil, fmt.Errorf("op %d: Missing startCollectingMetrics operation before stopping", opIndex)
 | 
							return nil, fmt.Errorf("missing startCollectingMetrics operation before stopping")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	collectorCtx.Cancel("collecting metrics, collector must stop first")
 | 
						collectorCtx.Cancel("collecting metrics, collector must stop first")
 | 
				
			||||||
	collectorWG.Wait()
 | 
						collectorWG.Wait()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user