You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (Jira)" <ji...@apache.org> on 2022/07/16 11:10:00 UTC

[jira] [Assigned] (OFBIZ-12666) Integration tests fail with Postgres DB

     [ https://issues.apache.org/jira/browse/OFBIZ-12666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-12666:
---------------------------------------

    Assignee: Jacques Le Roux

> Integration tests fail with Postgres DB
> ---------------------------------------
>
>                 Key: OFBIZ-12666
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12666
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/entity
>    Affects Versions: 22.01.01
>         Environment: Have been testing this in a vm running Debian 11 and in Docker using openjdk:11-jdk-slim as the base image.
>            Reporter: Johannes Schreiber
>            Assignee: Jacques Le Roux
>            Priority: Critical
>         Attachments: 0_MinilangTests.html, 10_facilitytests-fails.html, 10_facilitytests.html, 11_finaccounttests.html, 12_fixedassettests.html, 13_groupordertests.html, 14_invoicetests.html, 15_lucenetests.html, 16_marketingtests.html, 17_ordertests.html, 18_partycontactmechtests.html, 19_partystatuschangetests.html, 1_accountingtests.html, 20_partytests.html, 21_paymentappltests.html, 22_paymenttests.html, 23_performfindtests.html, 24_productConfigTests.html, 25_productPromoTests.html, 26_productcosttests.html, 27_productionruntests.html, 28_producttagtests.html, 29_producttests.html, 2_assetmainttests-errors.html, 2_assetmainttests.html, 30_quotetests.html, 31_ratetests.html, 32_scrumtests.html, 33_servicetests.html, 34_shoppingcarttests.html, 35_shoppinglisttests.html, 36_solrtests.html, 37_userlogintests.html, 38_widgettests.html, 39_workefforttests.html, 3_basetests.html, 4_catalogtests.html, 5_contenttests.html, 6_custrequesttests.html, 7_ecommercetests.html, 8_entitytests-errors.html, 8_entitytests.html, 9_example-tests.html, all-tests.html, allclasses-frame.html, alltests-errors.html, alltests-fails.html, alltests-skipped.html, index.html, overview-frame.html, overview-summary.html, package-frame.html, package-summary.html, test_results_assetmaint_entity_invoice.jpg, test_results_facilitytests.jpg, test_results_overview.jpg
>
>
> When using Postgres as the main database for OFBiz a couple of integration tests consistently fail (see below). This does not happen when using derby as the database. This is really unfortunate when trying to integrate OFBiz using CI/CD.
> Steps to test:
>  # clone [https://github.com/apache/ofbiz-framework.git] and checkout release22.01
>  # run ./gradlew pullAllPluginsSource
>  # make adjustments to build.gradle and entityengine.xml (see below)
>  # run ./gradlew cleanAll loadAll "ofbiz --test"
> I did not make any changes to OFBiz other then those made to the two file mentioned before.
> build.gradle diff:
> {code:java}
> diff --git a/build.gradle b/build.gradle
> index 6f2d644c43..5bb96902c1 100644
> --- a/build.gradle
> +++ b/build.gradle
> @@ -193,6 +193,7 @@ configurations {
>  }
>  
>  dependencies {
> +
>      implementation 'xerces:xercesImpl:2.12.2'
>      implementation 'com.google.zxing:core:3.4.1'
>      implementation 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2'
> @@ -267,6 +268,7 @@ dependencies {
>      runtimeOnly 'org.apache.logging.log4j:log4j-web:2.17.2' //???
>      runtimeOnly 'org.apache.logging.log4j:log4j-jcl:2.17.2' // need to constrain to version to avoid classpath conflict (ReflectionUtil)
>      runtimeOnly 'org.codeartisans.thirdparties.swing:batik-all:1.8pre-r1084380'
> +    runtimeOnly 'org.postgresql:postgresql:42.2.5'
>  
>      // Dependencies defined by the plugins
>      subprojects.each { subProject -> {code}
> entityengine.xml diff:
> {code:java}
> diff --git a/framework/entity/config/entityengine.xml b/framework/entity/config/entityengine.xml
> index e9abf07632..7b36749061 100644
> --- a/framework/entity/config/entityengine.xml
> +++ b/framework/entity/config/entityengine.xml
> @@ -52,20 +52,20 @@ access. For a detailed description see the core/docs/entityconfig.html file.
>      <debug-xa-resources value="false" />  <!-- see https://issues.apache.org/jira/browse/OFBIZ-4282 for more -->
>      
>      <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
> -        <group-map group-name="org.apache.ofbiz" datasource-name="localderby"/>
> +        <group-map group-name="org.apache.ofbiz" datasource-name="localpostgres"/>
>          <group-map group-name="org.apache.ofbiz.olap" datasource-name="localderbyolap"/>
>          <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localderbytenant"/>
>      </delegator>
>      <!-- May be used when you create a service that manages many data for massive imports, this for performance reason or to escape functional cases --> 
>      <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
> -        <group-map group-name="org.apache.ofbiz" datasource-name="localderby"/>
> +        <group-map group-name="org.apache.ofbiz" datasource-name="localpostgres"/>
>          <group-map group-name="org.apache.ofbiz.olap" datasource-name="localderbyolap"/>
>          <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localderbytenant"/>
>      </delegator>
>  
>      <!-- Be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "gradlew loadAll" before running "gradlew testIntegration" -->
>      <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
> -        <group-map group-name="org.apache.ofbiz" datasource-name="localderby"/>
> +        <group-map group-name="org.apache.ofbiz" datasource-name="localpostgres"/>
>          <group-map group-name="org.apache.ofbiz.olap" datasource-name="localderbyolap"/>
>          <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localderbytenant"/>
>      </delegator> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)