Fix missing TargetUpdate events (#476)
* Fix problem where target assignment sends not all events. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Improved concurrency. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Revert send assigned event change. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Adapt tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Readibility. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -61,7 +61,7 @@ public class AmqpMessageDispatcherServiceIntegrationTest extends AmqpServiceInte
|
||||
@Expect(type = ActionCreatedEvent.class, count = 2), @Expect(type = ActionUpdatedEvent.class, count = 1),
|
||||
@Expect(type = SoftwareModuleCreatedEvent.class, count = 6),
|
||||
@Expect(type = DistributionSetCreatedEvent.class, count = 2),
|
||||
@Expect(type = TargetUpdatedEvent.class, count = 1), @Expect(type = TargetPollEvent.class, count = 3) })
|
||||
@Expect(type = TargetUpdatedEvent.class, count = 2), @Expect(type = TargetPollEvent.class, count = 3) })
|
||||
public void assignDistributionSetMultipleTimes() {
|
||||
final DistributionSetAssignmentResult assignmentResult = registerTargetAndAssignDistributionSet();
|
||||
|
||||
@@ -98,8 +98,8 @@ public class AmqpMessageDispatcherServiceIntegrationTest extends AmqpServiceInte
|
||||
waitUntil(() -> {
|
||||
final Optional<Target> findTargetByControllerID = targetManagement
|
||||
.findTargetByControllerID(REGISTER_TARGET);
|
||||
return findTargetByControllerID.isPresent() && TargetUpdateStatus.PENDING
|
||||
.equals(findTargetByControllerID.get().getUpdateStatus());
|
||||
return findTargetByControllerID.isPresent()
|
||||
&& TargetUpdateStatus.PENDING.equals(findTargetByControllerID.get().getUpdateStatus());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user