mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
Remove flaky HPA deletion assertion in TestMultipleHPAs
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
This commit is contained in:
parent
ee1ff4866e
commit
4f8757b4c0
1 changed files with 0 additions and 12 deletions
|
|
@ -5192,7 +5192,6 @@ func TestMultipleHPAs(t *testing.T) {
|
|||
const testNamespace = "dummy-namespace"
|
||||
|
||||
processed := make(chan string, hpaCount)
|
||||
processedDeleted := make(chan string, 1)
|
||||
|
||||
testClient := &fake.Clientset{}
|
||||
testScaleClient := &scalefake.FakeScaleClient{}
|
||||
|
|
@ -5422,9 +5421,6 @@ func TestMultipleHPAs(t *testing.T) {
|
|||
})
|
||||
|
||||
testClient.AddReactor("delete", "horizontalpodautoscalers", func(action core.Action) (handled bool, ret runtime.Object, err error) {
|
||||
deleteAction := action.(core.DeleteAction)
|
||||
hpaName := deleteAction.GetName()
|
||||
processedDeleted <- hpaName
|
||||
return true, nil, nil
|
||||
})
|
||||
|
||||
|
|
@ -5480,14 +5476,6 @@ func TestMultipleHPAs(t *testing.T) {
|
|||
// Simulate the watch event for deletion
|
||||
hpaWatcher.Delete(&hpaList[0])
|
||||
|
||||
// Wait for deletion to be processed
|
||||
select {
|
||||
case deletedHPAName := <-processedDeleted:
|
||||
assert.Equal(t, hpaName, deletedHPAName, "Expected the deleted HPA name to match")
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatalf("Timeout waiting for HPA deletion to be processed")
|
||||
}
|
||||
|
||||
// Give the controller time to process the deletion and update the monitor
|
||||
assert.Eventually(t, func() bool {
|
||||
return hpaController.monitor.(*mockMonitor).GetObjectsCount() == hpaCount-1
|
||||
|
|
|
|||
Loading…
Reference in a new issue