test: replace fixed wait in RayCluster scale-down test - #5045
Open
Smallfu666 wants to merge 1 commit into
Open
Conversation
machichima
reviewed
Jul 30, 2026
Comment on lines
+188
to
+204
| g.Eventually(func() (int, error) { | ||
| workerPods, err := GetWorkerPods(test, rayCluster) | ||
| if err != nil { | ||
| return 0, err | ||
| } | ||
|
|
||
| deletingCount := 0 | ||
| for _, pod := range workerPods { | ||
| if pod.DeletionTimestamp != nil { | ||
| deletingCount++ | ||
| } | ||
| } | ||
| return deletingCount, nil | ||
| }, TestTimeoutShort).Should( | ||
| Equal(1), | ||
| "Should have only one worker pod having deletionTimestamp", | ||
| ) |
Collaborator
There was a problem hiding this comment.
Could we simplify to this?
g.Eventually(WorkerPods(test, rayCluster), TestTimeoutShort).Should(
ConsistOf(
HaveField("DeletionTimestamp", BeNil()),
HaveField("DeletionTimestamp", Not(BeNil())),
),
"Should have only one worker pod having deletionTimestamp",
)
Author
There was a problem hiding this comment.
Updated as suggested—thanks!
Smallfu666
force-pushed
the
fix/raycluster-scale-down-wait
branch
from
July 30, 2026 05:12
52d2420 to
0993da4
Compare
Collaborator
|
@Smallfu666 Do you mind rebase / merge master again? The failed CI test should be fixed. |
Signed-off-by: Smallfu666 <62057986+Smallfu666@users.noreply.github.com>
Smallfu666
force-pushed
the
fix/raycluster-scale-down-wait
branch
from
July 30, 2026 12:47
3327190 to
ee4d629
Compare
Author
@machichima Rebased, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
TestRayClusterScalingDowncurrently waits for a fixed five seconds before checking that exactly one worker Pod has been marked for deletion.This change replaces the fixed sleep with the existing Gomega
Eventuallypolling mechanism and waits directly for the same worker deletion condition. The redundant second worker Pod query and manual count assertion are removed.This only changes E2E test synchronization. Production behavior is unchanged.
Related issue number
N/A — small test synchronization cleanup.
Labels
doc-updates-requiredlabel.breaking-changelabel.Checks
Manual test instructions
Ran the targeted E2E test locally on kind:
Results: