-
Notifications
You must be signed in to change notification settings - Fork 72
Modified EscalationRepositoryTest class to include WorkflowUtil bean. #751
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
Conversation
WalkthroughA new mocked dependency, Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
core-services/egov-workflow-v2/src/test/java/org/egov/wf/repository/EscalationRepositoryTest.java
(2 hunks)
🔇 Additional comments (1)
core-services/egov-workflow-v2/src/test/java/org/egov/wf/repository/EscalationRepositoryTest.java (1)
14-14
: Approve import additionImporting
WorkflowUtil
aligns with the new mock bean declaration and satisfies the test context’s dependency requirements.
@MockBean | ||
private WorkflowUtil util; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify necessity and naming of the new mock bean
You’ve added a @MockBean private WorkflowUtil util;
to satisfy the repository’s dependency, but the field is currently unused in the test. Please:
- Confirm that
EscalationRepository
actually autowires and usesWorkflowUtil
in the production code. - Rename
util
toworkflowUtil
for clarity and consistency with the class name. - Stub or verify interactions with this mock in existing or new test methods if needed.
🏁 Script executed:
#!/bin/bash
# Check if EscalationRepository uses WorkflowUtil
rg -n "WorkflowUtil" core-services/egov-workflow-v2/src/main/java/org/egov/wf/repository/EscalationRepository.java
Length of output: 308
Confirm and refine the WorkflowUtil
mock in EscalationRepositoryTest
The EscalationRepository
constructor does inject a WorkflowUtil
instance (see lines 25 and 28 in EscalationRepository.java
), so supplying a @MockBean
is needed to load the Spring test context—but the mock is currently unused in your tests. Please:
• In
core-services/egov-workflow-v2/src/test/java/org/egov/wf/repository/EscalationRepositoryTest.java
– rename the field from util
to workflowUtil
(lines 37–38) for clarity.
• If any repository methods under test call into WorkflowUtil
, stub or verify those interactions on workflowUtil
.
• If none of the exercised code paths invoke WorkflowUtil
, consider removing the unused mock altogether.
🤖 Prompt for AI Agents
In
core-services/egov-workflow-v2/src/test/java/org/egov/wf/repository/EscalationRepositoryTest.java
around lines 37 to 38, the mock bean for WorkflowUtil is currently unused and
named 'util', which reduces clarity. Rename the field to 'workflowUtil' for
consistency with the class name, and verify if the test methods invoke any
methods on this mock; if so, stub or verify those interactions. If the mock is
not used in any test, consider removing it to clean up the test class.
* Added keycloak build config (#714) * adding githubactions workflow file (#715) * updating workflows action flow to pick from master and create images from all the branches (#718) * adding githubactions workflow file * Update build.yaml * Adding drop downs while triggering githubactions (#727) * Create sandbox.yml (#730) * Create sandbox.yml * Update sandbox.yml * Update sandbox.yml (#732) * Update build.yaml (#734) * Add business-services folder and new service to workflow inputs (#735) * Add business-services folder and new service to workflow inputs * Add business-services folder and new service to workflow inputs * Add business-services folder and new service to workflow inputs * Add business-services folder and new service to workflow inputs * Update build.yaml with correct service names --------- Co-authored-by: nikhilmulinti <127198713+nikhilmulinti@users.noreply.github.com> * Update sandbox.yml (#738) * added open telemetry (#748) * Updated idgen service * Updated mdms-v2 service * Updated workflow service * Updated egov-localization service * updated egov-location service * Updated tenant-management service * WIP: changes to Dockerfile and workflow * Update build dockerfile * Updated audit service * Updated boundary service * Updated access control * Updated enc service * Updated file store * Updated egov-indexer * updated mdms v1 service * Updated egov notification mail service * Updated notification sms * Updated egov-otp * updated egov persister * Updated pg service * Updated egov url shortening * Updated egov-user-event * Updated gateway service * Updated service request * Updated Dockerfile * Update Dockerfile-java 8 * Update Dockerfile- reverting back * Modified gateway POM according to new tracer. * Added opentelemetry tracing & @CustomSafeHtml in tracer. * Update Dockerfile * updated idgen * Updated localization * Updated mdms v2 * Updated workflow v2 * Updated location * Updated audit service * Updated boundary service * Updated access control * Updated enc service * Updated filestore * updated indexer * Added logic to replace {schema} placeholder in EscalationRepository class. * Updated mdms service * Updated notification mail * updated notification sms * Updated egov-otp * Updated persister * Updated pg service * Updated url shortening * Updated user event * Updated gateway * Updated service request * Update enc-client from 2.9.0-SNAPSHOT to 2.9.1 pom.xml --------- Co-authored-by: Varun Reddy <155146627+varunreddy-egov@users.noreply.github.com> Co-authored-by: nikhilmulinti <127198713+nikhilmulinti@users.noreply.github.com> Co-authored-by: varunreddy-egov <varun.kumar@egovernments.org> * Modified EscalationRepositoryTest class to include WorkflowUtil bean. (#751) * Updated Changelog in New open telemetry (#752) * Updated idgen service * Updated mdms-v2 service * Updated workflow service * Updated egov-localization service * updated egov-location service * Updated tenant-management service * WIP: changes to Dockerfile and workflow * Update build dockerfile * Updated audit service * Updated boundary service * Updated access control * Updated enc service * Updated file store * Updated egov-indexer * updated mdms v1 service * Updated egov notification mail service * Updated notification sms * Updated egov-otp * updated egov persister * Updated pg service * Updated egov url shortening * Updated egov-user-event * Updated gateway service * Updated service request * Updated Dockerfile * Update Dockerfile-java 8 * Update Dockerfile- reverting back * Modified gateway POM according to new tracer. * Added opentelemetry tracing & @CustomSafeHtml in tracer. * Update Dockerfile * updated idgen * Updated localization * Updated mdms v2 * Updated workflow v2 * Updated location * Updated audit service * Updated boundary service * Updated access control * Updated enc service * Updated filestore * updated indexer * Added logic to replace {schema} placeholder in EscalationRepository class. * Updated mdms service * Updated notification mail * updated notification sms * Updated egov-otp * Updated persister * Updated pg service * Updated url shortening * Updated user event * Updated gateway * Updated service request * updated idgen * Updated mdms v2 * updated location * Updated audit service * Updated access control * Updated enc service * updated filestore * Updated indexer * Updated mdms service * Updated notification mail * Updated notification sms * updated egov otp * Updated persister * Updated pg service * Updated url shortening * updated user event * Updated gateway * Update service request --------- Co-authored-by: Varun Reddy <155146627+varunreddy-egov@users.noreply.github.com> Co-authored-by: nikhilmulinti <127198713+nikhilmulinti@users.noreply.github.com> Co-authored-by: varunreddy-egov <varun.kumar@egovernments.org> --------- Co-authored-by: Varun Reddy <155146627+varunreddy-egov@users.noreply.github.com> Co-authored-by: nikhilmulinti <127198713+nikhilmulinti@users.noreply.github.com> Co-authored-by: DIGIT-support <digit-success@equidhi.org> Co-authored-by: talele08 <talele08@users.noreply.github.com> Co-authored-by: shilpa-egov <shilpa.m@egovernments.org> Co-authored-by: varunreddy-egov <varun.kumar@egovernments.org>
Summary by CodeRabbit