volcano icon indicating copy to clipboard operation
volcano copied to clipboard

add ut for enqueue action

Open googs1025 opened this issue 1 year ago • 8 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • add ut for action: enqueue

Which issue(s) this PR fixes:

Fixes #https://github.com/volcano-sh/volcano/issues/3053

Special notes for your reviewer:

Does this PR introduce a user-facing change?


googs1025 avatar May 07 '24 04:05 googs1025

Are there any cases about job can not enqueue?

lowang-bh avatar May 08 '24 02:05 lowang-bh

Are there any cases about job can not enqueue?

I added two type case, one: when pg is in running state, it will not join the queue, and the second one is when the specified queue does not exist, it will not join the queue.

googs1025 avatar May 08 '24 04:05 googs1025

How about queue's allocation plus the incoming inqueue's resource will exceed queue's capacity?

lowang-bh avatar May 08 '24 05:05 lowang-bh

How about queue's allocation plus the incoming inqueue's resource will exceed queue's capacity?

Yes, I thought about this case. I thought that these scenarios would be covered by the plugins test cases, so I did not add these cases. If needed, I can add it.

googs1025 avatar May 08 '24 05:05 googs1025

How about queue's allocation plus the incoming inqueue's resource will exceed queue's capacity?

If needed, I can add it.

I advise to add some cases.

lowang-bh avatar May 10 '24 02:05 lowang-bh

How about queue's allocation plus the incoming inqueue's resource will exceed queue's capacity?

If needed, I can add it.

I advise to add some cases.

done, i add the case "pggroup cannot enqueue because queue resources are less than podgroup MinResources"

googs1025 avatar May 10 '24 04:05 googs1025

/lgtm

@Monokaix @hwdef please also help to take a look. thanks.

lowang-bh avatar May 11 '24 12:05 lowang-bh

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lowang-bh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

volcano-sh-bot avatar May 20 '24 02:05 volcano-sh-bot