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

API changes proposal #760

Merged
merged 18 commits into from
Dec 22, 2021
Merged

API changes proposal #760

merged 18 commits into from
Dec 22, 2021

Conversation

metacosm
Copy link
Collaborator

No description provided.

@@ -69,4 +67,9 @@ public void stop() throws OperatorException {
super.stop();
cache.close();
}

@Override
public T getAssociated(P primary) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why it needs the whole resource? I think this should be ideally as simple as possible API and just use the ResourceID

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's just generalizing the method that's already present on InformerEventSource. This method will always be called in a context where the primary is available anyway so why restrict it to only providing the ResourceID?

Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure how we agreed on this, I still think it should be ResourceID :)

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class AbstractEventSourceTest<S extends EventSource, T extends EventHandler> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a Junit extension, as for Integration tests. I think there should be no inheritance in unit tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Feel free to change that.

@metacosm metacosm self-assigned this Dec 17, 2021
@metacosm metacosm marked this pull request as ready for review December 17, 2021 17:14
Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

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

Let's merge this, will work on followup polishing

@metacosm metacosm merged commit 37ea3a6 into main Dec 22, 2021
@metacosm metacosm deleted the api-changes branch December 22, 2021 13:51
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.

None yet

2 participants