Skip to content

Conversation

adityadwadasi
Copy link
Contributor

Before creating a pull request make sure that:

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)

Please remove this line and everything above and fill the following sections:

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/RWA-4661

Change description

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[ ] No

larslnde
larslnde previously approved these changes Sep 2, 2025
Copy link

github-actions bot commented Oct 3, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 3, 2025
private ServiceMocks mockServices;

@Test
void when_the_task_completed_values_should_reflect_replica_db() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As agreed, we should use our test naming convention "Should_ExpectedBehavior_When_StateUnderTest"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the test case name.

Copy link
Contributor

@BenNzewi BenNzewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to also check the task_history table?

@adityadwadasi
Copy link
Contributor Author

do we need to also check the task_history table?

Added history table assertions.


assertEquals(1, reportableTaskList.size());
assertEquals("COMPLETED", reportableTaskList.get(0).getState());
assertNotNull(reportableTaskList.get(0).getAssignee());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Majority of assertNotNull assertions can use real values


assertEquals(2, taskHistoryResourceList.size());
assertEquals("COMPLETED", taskHistoryResourceList.get(1).getState());
assertNotNull(taskHistoryResourceList.get(1).getAssignee());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Majority of assertNotNull assertions can use real values

});

await()
.pollDelay(5, SECONDS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to wait 5 seconds between each poll?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants