mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #107095 from songlh/fixing-4
fixing three goroutine leaks in bounded_frequency_runner_test.go
This commit is contained in:
		@@ -277,6 +277,9 @@ func Test_BoundedFrequencyRunnerNoBurst(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
	// Clean up.
 | 
			
		||||
	stop <- struct{}{}
 | 
			
		||||
	// a message is sent to time.updated in func Stop() at the end of the child goroutine
 | 
			
		||||
	// to terminate the child, a receive on time.updated is needed here
 | 
			
		||||
	<-timer.updated
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Test_BoundedFrequencyRunnerBurst(t *testing.T) {
 | 
			
		||||
@@ -358,6 +361,9 @@ func Test_BoundedFrequencyRunnerBurst(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
	// Clean up.
 | 
			
		||||
	stop <- struct{}{}
 | 
			
		||||
	// a message is sent to time.updated in func Stop() at the end of the child goroutine
 | 
			
		||||
	// to terminate the child, a receive on time.updated is needed here
 | 
			
		||||
	<-timer.updated
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Test_BoundedFrequencyRunnerRetryAfter(t *testing.T) {
 | 
			
		||||
@@ -441,4 +447,7 @@ func Test_BoundedFrequencyRunnerRetryAfter(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
	// Clean up.
 | 
			
		||||
	stop <- struct{}{}
 | 
			
		||||
	// a message is sent to time.updated in func Stop() at the end of the child goroutine
 | 
			
		||||
	// to terminate the child, a receive on time.updated is needed here
 | 
			
		||||
	<-timer.updated
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user