Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Dec 13, 2024
1 parent 0d31e13 commit 539f4c2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Job getJob(String id) throws DAOException {
.createQuery(cq)
.setMaxResults(1)
.setLockMode(LockModeType.PESSIMISTIC_WRITE)
.setHint("javax.persistence.lock.timeout", -2)
.setHint("jakarta.persistence.lock.timeout", -2)
.getSingleResult();

} catch (NoResultException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Getter
@Setter
@Entity
@Table(name = "APM_JOB")
@Table(name = "JOB")
public class Job extends TraceableEntity {

}
8 changes: 6 additions & 2 deletions src/main/resources/db/v1/2024-12-13-create-tables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@
<addUniqueConstraint columnNames="key, application_id, product_name, tenant_id" constraintName="parameter_constraint" tableName="parameter"/>
</changeSet>
<changeSet author="dev (generated)" id="1734081628790-3">
<createTable tableName="apm_job">
<createTable tableName="job">
<column name="optlock" type="INTEGER">
<constraints nullable="false"/>
</column>
<column name="creationdate" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="modificationdate" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="guid" type="VARCHAR(255)">
<constraints nullable="false" primaryKey="true" primaryKeyName="apm_job_pkey"/>
<constraints nullable="false" primaryKey="true" primaryKeyName="job_pkey"/>
</column>
<column name="creationuser" type="VARCHAR(255)"/>
<column name="modificationuser" type="VARCHAR(255)"/>
</createTable>
<insert tableName="job">
<column name="guid" value="maintenance.history"/>
<column name="optlock" value="1"/>
</insert>
</changeSet>
<changeSet author="dev (generated)" id="1734081628790-4">
<createTable tableName="parameter_history">
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/data/parameters-dao-testdata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<PARAMETER guid="GUID1" optlock="1" application_id="app1" product_name="p1" name="param" key="param" set_value="${STRING_ENV_VARIABLE}/test" description="param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID2" optlock="1" application_id="app1" product_name="p1" name="integer_param" key="integer_param" set_value="${INTEGER_ENV_VARIABLE}${INTEGER_ENV_VARIABLE}" description="integer param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID3" optlock="1" application_id="app1" product_name="p1" name="boolean_param" key="boolean_param" set_value="${BOOLEAN_ENV_VARIABLE}" description="boolean param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID1" optlock="1" application_id="app1" product_name="p1" name="param" key="param" value="${STRING_ENV_VARIABLE}/test" description="param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID2" optlock="1" application_id="app1" product_name="p1" name="integer_param" key="integer_param" value="${INTEGER_ENV_VARIABLE}${INTEGER_ENV_VARIABLE}" description="integer param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID3" optlock="1" application_id="app1" product_name="p1" name="boolean_param" key="boolean_param" value="${BOOLEAN_ENV_VARIABLE}" description="boolean param example" tenant_id="tenant-100" />
</dataset>
14 changes: 7 additions & 7 deletions src/test/resources/data/parameters-testdata.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<PARAMETER guid="GUID1" optlock="1" application_id="app1" product_name="p1" name="param" key="param" set_value="&quot;${STRING_ENV_VARIABLE}/test&quot;" description="param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID2" optlock="1" application_id="app1" product_name="p1" name="integer_param" key="integer_param" set_value="&quot;${INTEGER_ENV_VARIABLE}${INTEGER_ENV_VARIABLE}&quot;" description="integer param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID3" optlock="1" application_id="app1" product_name="p1" name="boolean_param" key="boolean_param" set_value="&quot;${BOOLEAN_ENV_VARIABLE}&quot;" description="boolean param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID4" optlock="1" application_id="app1" product_name="p1" name="cyclic_param" key="cyclic_param" set_value="&quot;${CYCLIC_ENV_VARIABLE}&quot;" description="cyclic param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID5" optlock="1" application_id="app1" product_name="p1" name="existStringParam" key="existStringParam" set_value="&quot;Existing&quot;" description="existing parameter" tenant_id="tenant-100" />
<PARAMETER guid="GUID1" optlock="1" application_id="app1" product_name="p1" name="param" key="param" value="&quot;${STRING_ENV_VARIABLE}/test&quot;" description="param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID2" optlock="1" application_id="app1" product_name="p1" name="integer_param" key="integer_param" value="&quot;${INTEGER_ENV_VARIABLE}${INTEGER_ENV_VARIABLE}&quot;" description="integer param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID3" optlock="1" application_id="app1" product_name="p1" name="boolean_param" key="boolean_param" value="&quot;${BOOLEAN_ENV_VARIABLE}&quot;" description="boolean param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID4" optlock="1" application_id="app1" product_name="p1" name="cyclic_param" key="cyclic_param" value="&quot;${CYCLIC_ENV_VARIABLE}&quot;" description="cyclic param example" tenant_id="tenant-100" />
<PARAMETER guid="GUID5" optlock="1" application_id="app1" product_name="p1" name="existStringParam" key="existStringParam" value="&quot;Existing&quot;" description="existing parameter" tenant_id="tenant-100" />


<PARAMETER guid="111" optlock="1" application_id="access-mgmt" product_name="access-mgmt-product" name="Engine" key="ENGINE" set_value="&quot;KOGITO&quot;" tenant_id="tenant-100" />
<PARAMETER guid="111" optlock="1" application_id="access-mgmt" product_name="access-mgmt-product" name="Engine" key="ENGINE" value="&quot;KOGITO&quot;" tenant_id="tenant-100" />

<PARAMETER_HISTORY guid="1" optlock="1" application_id="access-mgmt" product_name="access-mgmt-product" key="ENGINE" used_value="JBPM" default_value="JBPM" interval_start="2019-03-24" interval_end="2019-03-23" tenant_id="tenant-100" />
<PARAMETER_HISTORY guid="2" optlock="1" application_id="access-mgmt" product_name="access-mgmt-product" key="ENGINE" used_value="KOGITO" default_value="JBPM" interval_start="2019-03-25" interval_end="2019-03-26" tenant_id="tenant-100" />

<PARAMETER guid="112" optlock="1" application_id="access-mgmt" product_name="access-mgmt-product" key="COUNTER" tenant_id="tenant-100" />
<PARAMETER guid="113" optlock="1" application_id="portal-server" product_name="portal-server-product" key="RETURN_PORTAL_INFO" set_value="true" tenant_id="tenant-100" />
<PARAMETER guid="113" optlock="1" application_id="portal-server" product_name="portal-server-product" key="RETURN_PORTAL_INFO" value="true" tenant_id="tenant-100" />
<PARAMETER guid="114" optlock="1" application_id="order-mgmt" product_name="order-mgmt-product" key="UNKNOWN_PARAMETER" tenant_id="tenant-100" />

<PARAMETER_HISTORY guid="h1" optlock="1" application_id="app1" product_name="p1" key="key1" value_type="String" used_value="JBPM" default_value="JBPM" interval_start="2019-03-24" interval_end="2019-03-23" INSTANCE_ID="i1" tenant_id="tenant-100"/>
Expand Down

0 comments on commit 539f4c2

Please sign in to comment.