use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricJobLogQueryTest method testQueryByTenantId.
public void testQueryByTenantId() {
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_ONE);
assertThat(query.count(), is(2L));
query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_TWO);
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricJobLogQueryTest method testQueryAuthenticatedTenants.
public void testQueryAuthenticatedTenants() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery();
assertThat(query.count(), is(4L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(2L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricJobLogQueryTest method testQueryWithoutTenantId.
public void testQueryWithoutTenantId() {
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery();
assertThat(query.count(), is(4L));
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricJobLogQueryTest method testQueryByTenantIds.
public void testQueryByTenantIds() {
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
assertThat(query.count(), is(4L));
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class HistoricJobLogAuthorizationTest method testSimpleQueryWithMultiple.
public void testSimpleQueryWithMultiple() {
// given
startProcessAndExecuteJob(ONE_INCIDENT_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
createGrantAuthorization(PROCESS_DEFINITION, ONE_INCIDENT_PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery();
// then
verifyQueryResults(query, 5);
}
Aggregations