Skip to content
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

Fix refresh issue #802

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nishantb1
Copy link

@nishantb1 nishantb1 commented Oct 18, 2023

Description

The change of setting the refresh policy to IMMEDIATE ensures that the index is refreshed right away after a create, update, or delete operation on the notification configs. This makes the changes visible in real-time without waiting for the next scheduled refresh. It's beneficial in scenarios where immediate visibility of changes is crucial, such as in real-time applications or testing environments. By making this change, the need for Thread.sleep invocations in integration tests is eliminated, making the tests potentially faster and more reliable.

Issues Resolved

This PR will resolve the issue regarding the delay in reflecting changes when creating, updating, or deleting notification configurations due to the index not being immediately refreshed. By ensuring an immediate refresh, it enhances real-time visibility of changes, improves user interaction with the notifications API, and optimizes integration testing by removing the need for Thread.sleep invocations to wait for the index to refresh.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Nishant Bhagat <[email protected]>
Signed-off-by: Nishant Bhagat <[email protected]>
Signed-off-by: Nishant Bhagat <[email protected]>
@Hailong-am
Copy link
Collaborator

@bobbane11 would you mind run ./gradlew ktlintFormat to fix ktlint issue

Copy link
Member

Choose a reason for hiding this comment

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

We should also set refresh policy for delete action

Copy link
Member

Choose a reason for hiding this comment

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

The Thread.sleep not only invoked in ChimeNotificationConfigCrudIT, I believe most integ tests about CRUD notification config having this proplem. Could you please find them and remove all these invocations?

@zhichao-aws
Copy link
Member

Please make sure the changes can pass the build at your local environment by running ./gradlew build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants