Fix AmqpMessageDispatcherServiceTest.testSendCancelRequest - set action tenant (#2098)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-22 17:36:07 +02:00
committed by GitHub
parent 9df68e2d97
commit 4de34eacc3
12 changed files with 42 additions and 61 deletions

View File

@@ -17,8 +17,7 @@ import org.eclipse.hawkbit.tenancy.TenantAware;
import org.springframework.transaction.annotation.Transactional;
/**
* A TenantAwareEvent entity manager, which loads an entity by id and type for
* remote events.
* A TenantAwareEvent entity manager, which loads an entity by id and type for remote events.
*/
@Transactional(readOnly = true)
public class JpaEventEntityManager implements EventEntityManager {
@@ -38,8 +37,7 @@ public class JpaEventEntityManager implements EventEntityManager {
}
@Override
public <E extends TenantAwareBaseEntity> E findEntity(final String tenant, final Long id,
final Class<E> entityType) {
public <E extends TenantAwareBaseEntity> E findEntity(final String tenant, final Long id, final Class<E> entityType) {
return tenantAware.runAsTenant(tenant, () -> entityManager.find(entityType, id));
}
}