-
Notifications
You must be signed in to change notification settings - Fork 179
refactor(flowcontrol): Enable behavioral mocking #1202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(flowcontrol): Enable behavioral mocking #1202
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Hi @LukeAVanDrie. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
/lgtm Testing infra for flow control |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, LukeAVanDrie 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 |
The existing mock implementations for the flow control framework policies and accessors were simple stubs that returned fixed values. This style of mocking is too restrictive for testing complex, concurrent components where behavior needs to be dynamically controlled at test time. To prepare for testing more advanced orchestration logic, this commit refactors the core mocks to use function fields instead of static return values. This transforms them from simple stubs into flexible, behavioral mocks. Tests can now inject custom logic at runtime to simulate a wide range of policy decisions and interactions. The following mocks were updated: - MockPriorityBandAccessor - MockIntraFlowDispatchPolicy - MockInterFlowDispatchPolicy The policy tests that consume these mocks have been updated to use this new, more powerful mocking pattern.
a307ff0
to
3356cad
Compare
/lgtm |
The existing mock implementations for the flow control framework policies and accessors were simple stubs that returned fixed values. This style of mocking is too restrictive for testing complex, concurrent components where behavior needs to be dynamically controlled at test time. To prepare for testing more advanced orchestration logic, this commit refactors the core mocks to use function fields instead of static return values. This transforms them from simple stubs into flexible, behavioral mocks. Tests can now inject custom logic at runtime to simulate a wide range of policy decisions and interactions. The following mocks were updated: - MockPriorityBandAccessor - MockIntraFlowDispatchPolicy - MockInterFlowDispatchPolicy The policy tests that consume these mocks have been updated to use this new, more powerful mocking pattern.
The existing mock implementations for the flow control framework policies and accessors were simple stubs that returned fixed values. This style of mocking is too restrictive for testing complex, concurrent components where behavior needs to be dynamically controlled at test time.
This tracks #674
To prepare for testing more advanced orchestration logic (in the subsequent PR), this commit refactors the core mocks to use function fields instead of static return values. This transforms them from simple stubs into flexible, behavioral mocks. Tests can now inject custom logic at runtime to simulate a wide range of policy decisions and interactions.
The following mocks were updated:
The policy tests that consume these mocks have been updated to use this new, more powerful mocking pattern.