TSK-948: Delete db2 only irrelevant tests
This commit is contained in:
parent
57670b854e
commit
b8bbd4c5e3
|
@ -4,18 +4,12 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.core.IsEqual.equalTo;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import pro.taskana.ClassificationService;
|
||||
import pro.taskana.ClassificationSummary;
|
||||
import pro.taskana.configuration.DB;
|
||||
import pro.taskana.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.security.JaasExtension;
|
||||
|
||||
/** Acceptance test for all "query classifications with pagination" scenarios. */
|
||||
|
@ -140,32 +134,6 @@ class QueryClassificationWithPaginationAccTest extends AbstractAccTest {
|
|||
assertThat(results.size(), equalTo(10));
|
||||
}
|
||||
|
||||
/**
|
||||
* Testcase only for DB2 users, because H2 doesn´t throw a Exception when the offset is set to
|
||||
* high.<br>
|
||||
* Using DB2 should throw a unchecked RuntimeException for a offset which is out of bounds.
|
||||
*/
|
||||
@Disabled
|
||||
@Test
|
||||
void testPaginationThrowingExceptionWhenPageOutOfBounds() throws SQLException {
|
||||
|
||||
Assumptions.assumeTrue(DB.isDb2(getDatabaseProductId()), "Only test with DB2");
|
||||
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
// entrypoint set outside result amount
|
||||
int pageNumber = 5;
|
||||
int pageSize = 10;
|
||||
|
||||
Assertions.assertThrows(
|
||||
TaskanaRuntimeException.class,
|
||||
() ->
|
||||
classificationService
|
||||
.createClassificationQuery()
|
||||
.domainIn("DOMAIN_A")
|
||||
.listPage(pageNumber, pageSize),
|
||||
"Using DB2 should throw a unchecked RuntimeException for a offset which is out of bounds.");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCountOfClassificationsQuery() {
|
||||
ClassificationService classificationService = taskanaEngine.getClassificationService();
|
||||
|
|
|
@ -4,10 +4,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.core.IsEqual.equalTo;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
@ -16,8 +13,6 @@ import pro.taskana.ObjectReference;
|
|||
import pro.taskana.ObjectReferenceQuery;
|
||||
import pro.taskana.TaskQuery;
|
||||
import pro.taskana.TaskService;
|
||||
import pro.taskana.configuration.DB;
|
||||
import pro.taskana.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.security.JaasExtension;
|
||||
|
||||
/** Acceptance test for all "query classifications with pagination" scenarios. */
|
||||
|
@ -115,20 +110,6 @@ class QueryObjectreferencesWithPaginationAccTest extends AbstractAccTest {
|
|||
assertThat(results.size(), equalTo(3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPaginationThrowingExceptionWhenPageOutOfBounds() throws SQLException {
|
||||
|
||||
Assumptions.assumeTrue(DB.isDb2(getDatabaseProductId()), "Only test with DB2");
|
||||
|
||||
// entrypoint set outside result amount
|
||||
int pageNumber = 6;
|
||||
int pageSize = 10;
|
||||
Assertions.assertThrows(
|
||||
TaskanaRuntimeException.class,
|
||||
() -> objRefQuery.listPage(pageNumber, pageSize),
|
||||
"Using DB2 should throw a unchecked RuntimeException for a offset which is out of bounds.");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCountOfClassificationsQuery() {
|
||||
long count = objRefQuery.count();
|
||||
|
|
|
@ -4,18 +4,13 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.core.IsEqual.equalTo;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import pro.taskana.KeyDomain;
|
||||
import pro.taskana.TaskService;
|
||||
import pro.taskana.TaskSummary;
|
||||
import pro.taskana.configuration.DB;
|
||||
import pro.taskana.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.security.JaasExtension;
|
||||
import pro.taskana.security.WithAccessId;
|
||||
|
||||
|
@ -173,29 +168,6 @@ class QueryTasksWithPaginationAccTest extends AbstractAccTest {
|
|||
assertThat(results.size(), equalTo(10));
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
userName = "teamlead_1",
|
||||
groupNames = {"group_1"})
|
||||
@Test
|
||||
void testPaginationThrowingExceptionWhenPageOutOfBounds() throws SQLException {
|
||||
|
||||
Assumptions.assumeTrue(DB.isDb2(getDatabaseProductId()), "Only test with DB2");
|
||||
TaskService taskService = taskanaEngine.getTaskService();
|
||||
|
||||
// entrypoint set outside result amount
|
||||
int pageNumber = 6;
|
||||
int pageSize = 10;
|
||||
|
||||
Assertions.assertThrows(
|
||||
TaskanaRuntimeException.class,
|
||||
() ->
|
||||
taskService
|
||||
.createTaskQuery()
|
||||
.workbasketKeyDomainIn(new KeyDomain("GPK_KSC", "DOMAIN_A"))
|
||||
.listPage(pageNumber, pageSize),
|
||||
"Using DB2 should throw a unchecked RuntimeException for a offset which is out of bounds.");
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
userName = "teamlead_1",
|
||||
groupNames = {"group_1"})
|
||||
|
|
|
@ -4,17 +4,12 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.core.IsEqual.equalTo;
|
||||
|
||||
import acceptance.AbstractAccTest;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import pro.taskana.WorkbasketService;
|
||||
import pro.taskana.WorkbasketSummary;
|
||||
import pro.taskana.configuration.DB;
|
||||
import pro.taskana.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.security.JaasExtension;
|
||||
import pro.taskana.security.WithAccessId;
|
||||
|
||||
|
@ -155,26 +150,6 @@ class QueryWorkbasketsWithPaginationAccTest extends AbstractAccTest {
|
|||
assertThat(results.size(), equalTo(9));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPaginationThrowingExceptionWhenPageOutOfBounds() throws SQLException {
|
||||
|
||||
Assumptions.assumeTrue(DB.isDb2(getDatabaseProductId()), "Only test with DB2");
|
||||
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
|
||||
|
||||
// entrypoint set outside result amount
|
||||
int pageNumber = 6;
|
||||
int pageSize = 10;
|
||||
|
||||
Assertions.assertThrows(
|
||||
TaskanaRuntimeException.class,
|
||||
() ->
|
||||
workbasketService
|
||||
.createWorkbasketQuery()
|
||||
.domainIn("DOMAIN_A")
|
||||
.listPage(pageNumber, pageSize),
|
||||
"Using DB2 should throw a unchecked RuntimeException for a offset which is out of bounds");
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
userName = "teamlead_1",
|
||||
groupNames = {"group_1"})
|
||||
|
|
Loading…
Reference in New Issue