Test and build performance improvements (#552)
* Small build perf improvements. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Remove dead code. Stabilize test. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Further optimizations Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Upgrade mariadb driver. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Raise timeouts for more robustness on slower build environments. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Move webappcontext into rest tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Raised timeout. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Remove test dependency on target to groups distribution order. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Code reuse. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Context available to tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Typos fixed. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix PollEvent send. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix typos. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Test log readability and removed unused method from CM. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Remove empty payload. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Stabilize tests. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Raised timeout. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fixed fire directory change during one test class run. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -38,8 +38,8 @@ import org.eclipse.hawkbit.ui.distributions.smtype.DistSMTypeFilterLayout;
|
||||
import org.eclipse.hawkbit.ui.distributions.state.ManageDistUIState;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
|
||||
import org.eclipse.hawkbit.ui.menu.DashboardMenuItem;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionCreatedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionDeletedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetCreatedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetDeletedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.SoftwareModuleCreatedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.SoftwareModuleDeletedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
@@ -278,8 +278,8 @@ public class DistributionsView extends AbstractNotificationView implements Brows
|
||||
protected Map<Class<?>, RefreshableContainer> getSupportedPushEvents() {
|
||||
final Map<Class<?>, RefreshableContainer> supportedEvents = Maps.newHashMapWithExpectedSize(2);
|
||||
|
||||
supportedEvents.put(DistributionCreatedEventContainer.class, distributionTableLayout.getTable());
|
||||
supportedEvents.put(DistributionDeletedEventContainer.class, distributionTableLayout.getTable());
|
||||
supportedEvents.put(DistributionSetCreatedEventContainer.class, distributionTableLayout.getTable());
|
||||
supportedEvents.put(DistributionSetDeletedEventContainer.class, distributionTableLayout.getTable());
|
||||
|
||||
supportedEvents.put(SoftwareModuleCreatedEventContainer.class, softwareModuleTableLayout.getTable());
|
||||
supportedEvents.put(SoftwareModuleDeletedEventContainer.class, softwareModuleTableLayout.getTable());
|
||||
|
||||
@@ -47,8 +47,8 @@ import org.eclipse.hawkbit.ui.management.targettable.TargetTableLayout;
|
||||
import org.eclipse.hawkbit.ui.management.targettag.CreateUpdateTargetTagLayoutWindow;
|
||||
import org.eclipse.hawkbit.ui.management.targettag.TargetTagFilterLayout;
|
||||
import org.eclipse.hawkbit.ui.menu.DashboardMenuItem;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionCreatedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionDeletedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetCreatedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetDeletedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetTagCreatedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetTagDeletedEventContainer;
|
||||
import org.eclipse.hawkbit.ui.push.DistributionSetTagUpdatedEventContainer;
|
||||
@@ -402,8 +402,8 @@ public class DeploymentView extends AbstractNotificationView implements BrowserW
|
||||
supportedEvents.put(TargetCreatedEventContainer.class, targetTableLayout.getTable());
|
||||
supportedEvents.put(TargetDeletedEventContainer.class, targetTableLayout.getTable());
|
||||
|
||||
supportedEvents.put(DistributionCreatedEventContainer.class, distributionTableLayout.getTable());
|
||||
supportedEvents.put(DistributionDeletedEventContainer.class, distributionTableLayout.getTable());
|
||||
supportedEvents.put(DistributionSetCreatedEventContainer.class, distributionTableLayout.getTable());
|
||||
supportedEvents.put(DistributionSetDeletedEventContainer.class, distributionTableLayout.getTable());
|
||||
|
||||
supportedEvents.put(TargetTagCreatedEventContainer.class, targetTagFilterLayout);
|
||||
supportedEvents.put(TargetTagDeletedEventContainer.class, targetTagFilterLayout);
|
||||
|
||||
@@ -96,7 +96,7 @@ public class DelayedEventBusPushStrategy implements EventPushStrategy, Applicati
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
private boolean isEventProvided(final org.eclipse.hawkbit.repository.event.TenantAwareEvent event) {
|
||||
private boolean isEventProvided(final TenantAwareEvent event) {
|
||||
return eventProvider.getEvents().containsKey(event.getClass());
|
||||
}
|
||||
|
||||
@@ -174,8 +174,7 @@ public class DelayedEventBusPushStrategy implements EventPushStrategy, Applicati
|
||||
* @return {@code true} if the event can be dispatched to the UI
|
||||
* otherwise {@code false}
|
||||
*/
|
||||
private boolean eventSecurityCheck(final SecurityContext userContext,
|
||||
final org.eclipse.hawkbit.repository.event.TenantAwareEvent event) {
|
||||
private boolean eventSecurityCheck(final SecurityContext userContext, final TenantAwareEvent event) {
|
||||
if (userContext == null || userContext.getAuthentication() == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -187,8 +186,7 @@ public class DelayedEventBusPushStrategy implements EventPushStrategy, Applicati
|
||||
return false;
|
||||
}
|
||||
|
||||
private void doDispatch(final List<org.eclipse.hawkbit.repository.event.TenantAwareEvent> events,
|
||||
final WrappedSession wrappedSession) {
|
||||
private void doDispatch(final List<TenantAwareEvent> events, final WrappedSession wrappedSession) {
|
||||
final SecurityContext userContext = (SecurityContext) wrappedSession
|
||||
.getAttribute(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY);
|
||||
final SecurityContext oldContext = SecurityContextHolder.getContext();
|
||||
|
||||
@@ -16,11 +16,11 @@ import org.eclipse.hawkbit.repository.event.remote.entity.DistributionSetCreated
|
||||
* EventHolder for {@link DistributionSetCreatedEvent}s.
|
||||
*
|
||||
*/
|
||||
public class DistributionCreatedEventContainer implements EventContainer<DistributionSetCreatedEvent> {
|
||||
public class DistributionSetCreatedEventContainer implements EventContainer<DistributionSetCreatedEvent> {
|
||||
private static final String I18N_UNREAD_NOTIFICATION_UNREAD_MESSAGE = "distribution.created.event.container.notifcation.message";
|
||||
private final List<DistributionSetCreatedEvent> events;
|
||||
|
||||
DistributionCreatedEventContainer(final List<DistributionSetCreatedEvent> events) {
|
||||
DistributionSetCreatedEventContainer(final List<DistributionSetCreatedEvent> events) {
|
||||
this.events = events;
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ import org.eclipse.hawkbit.repository.event.remote.DistributionSetDeletedEvent;
|
||||
* EventHolder for {@link DistributionSetDeletedEvent}s.
|
||||
*
|
||||
*/
|
||||
public class DistributionDeletedEventContainer implements EventContainer<DistributionSetDeletedEvent> {
|
||||
public class DistributionSetDeletedEventContainer implements EventContainer<DistributionSetDeletedEvent> {
|
||||
private static final String I18N_UNREAD_NOTIFICATION_UNREAD_MESSAGE = "distribution.deleted.event.container.notifcation.message";
|
||||
private final List<DistributionSetDeletedEvent> events;
|
||||
|
||||
DistributionDeletedEventContainer(final List<DistributionSetDeletedEvent> events) {
|
||||
DistributionSetDeletedEventContainer(final List<DistributionSetDeletedEvent> events) {
|
||||
this.events = events;
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ public class HawkbitEventProvider implements UIEventProvider {
|
||||
EVENTS.put(CancelTargetAssignmentEvent.class, CancelTargetAssignmentEventContainer.class);
|
||||
|
||||
EVENTS.put(DistributionSetUpdatedEvent.class, DistributionSetUpdatedEventContainer.class);
|
||||
EVENTS.put(DistributionSetDeletedEvent.class, DistributionDeletedEventContainer.class);
|
||||
EVENTS.put(DistributionSetCreatedEvent.class, DistributionCreatedEventContainer.class);
|
||||
EVENTS.put(DistributionSetDeletedEvent.class, DistributionSetDeletedEventContainer.class);
|
||||
EVENTS.put(DistributionSetCreatedEvent.class, DistributionSetCreatedEventContainer.class);
|
||||
|
||||
EVENTS.put(RolloutGroupChangedEvent.class, RolloutGroupChangedEventContainer.class);
|
||||
EVENTS.put(RolloutChangedEvent.class, RolloutChangeEventContainer.class);
|
||||
|
||||
Reference in New Issue
Block a user