mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Fix #14284: TestPersistentVolumeClaimBinder flake
This commit is contained in:
		@@ -86,16 +86,18 @@ func TestPersistentVolumeClaimBinder(t *testing.T) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	defer watch.Stop()
 | 
						defer watch.Stop()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	boundCount := 0
 | 
						// Wait for claim01 and claim02 to become bound
 | 
				
			||||||
	expectedBoundCount := 2
 | 
						claim01Pending := true
 | 
				
			||||||
	for {
 | 
						claim02Pending := true
 | 
				
			||||||
 | 
						for claim01Pending || claim02Pending {
 | 
				
			||||||
		event := <-watch.ResultChan()
 | 
							event := <-watch.ResultChan()
 | 
				
			||||||
		claim := event.Object.(*api.PersistentVolumeClaim)
 | 
							claim := event.Object.(*api.PersistentVolumeClaim)
 | 
				
			||||||
		if claim.Spec.VolumeName != "" {
 | 
							if claim.Spec.VolumeName != "" && claim.Status.Phase != "Bound" {
 | 
				
			||||||
			boundCount++
 | 
								if claim.Name == "claim01" {
 | 
				
			||||||
		}
 | 
									claim01Pending = false
 | 
				
			||||||
		if boundCount == expectedBoundCount {
 | 
								} else if claim.Name == "claim02" {
 | 
				
			||||||
			break
 | 
									claim02Pending = false
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user