-
Notifications
You must be signed in to change notification settings - Fork 2
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
moved action filtering to the database query level #12
moved action filtering to the database query level #12
Conversation
Signed-off-by: Ahmed Sayed <[email protected]>
@stefbehl could you please verify the changes done specially in the tests (semantics point of view)? I removed the events checking with EventHandlerStub and replaced it with |
Signed-off-by: Ahmed Sayed <[email protected]>
* @return <code>true</code> if one or more active actions for the given | ||
* controllerId and action status are found | ||
*/ | ||
boolean existsByTargetControllerIdAndStatusAndActiveIsTrue(@Param("controllerId") String controllerId, |
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.
I think you can remove the Param annotations as you do not specify a custom query which references the params
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.
Thanks for contributing this - looks good!
There is one finding you might wanna take a look at (see my comment).
Signed-off-by: Ahmed Sayed <[email protected]>
@@ -1178,73 +1118,6 @@ public DeploymentResult(final Iterable<Target> deployedTs, final Iterable<Target | |||
|
|||
} | |||
|
|||
protected static class EventHandlerStub implements ApplicationListener<TargetAssignDistributionSetEvent> { |
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.
@peerreviewer
double check if the eventHandleStub is really not needed (rudimentary).
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.
@peerreviewer
are the timeouts respected with these changes?
final DistributionSet distributionSet2 = testdataFactory.createDistributionSet(UUID.randomUUID().toString()); | ||
registerTargetAndAssignDistributionSet(distributionSet2.getId(), TargetUpdateStatus.PENDING, | ||
getDistributionSet().getModules(), controllerId); | ||
testdataFactory.addSoftwareModuleMetadata(distributionSet2); |
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.
@peerreviewer
double check if the change doesn't change the test behaviour.
@@ -34,7 +34,7 @@ | |||
@JsonProperty | |||
private List<DmfArtifact> artifacts; | |||
@JsonProperty | |||
private List<DmfMetadata> metadata; | |||
private List<DmfMetadata> metadata = Collections.emptyList(); |
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.
revert
Signed-off-by: Ahmed Sayed <[email protected]>
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.
Looks good. Thanks!
* Add remote event test for the new MultiActionEvent * Improve test descriptions * Improve sendMultiActionRequestMessages * Moved action filtering to the database query level (#12) * Use @ExpectedEvents instead of EventHandlerStubs * Removed @param from 'existsByTargetControllerIdAndStatusAndActiveIsTrue' * Reverted metadata initialization * Fix hawkBit bot findings Signed-off-by: Stefan Behl <[email protected]> Signed-off-by: Ahmed Sayed <[email protected]>
* Add remote event test for the new MultiActionEvent * Improve test descriptions * Improve sendMultiActionRequestMessages * Moved action filtering to the database query level (#12) * Use @ExpectedEvents instead of EventHandlerStubs * Removed @param from 'existsByTargetControllerIdAndStatusAndActiveIsTrue' * Reverted metadata initialization * Fix hawkBit bot findings Signed-off-by: Stefan Behl <[email protected]> Signed-off-by: Ahmed Sayed <[email protected]>
Signed-off-by: Ahmed Sayed [email protected]