Bug 1308925 - Support MariaDB in engine tests
Support MariaDB in engine tests
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
urgent Severity high
: ER3
: 6.3.0
Assigned To: Petr Široký
Marek Winkler
Depends On:
  Show dependency treegraph
Reported: 2016-02-16 08:24 EST by Marek Winkler
Modified: 2016-04-18 09:08 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marek Winkler 2016-02-16 08:24:35 EST
Description of problem:

Drools and jBPM engine tests do not support MariaDB:

- org.drools.persistence.util.PersistenceUtil
- org.jbpm.persistence.util.PersistenceUtil

I would like to ask about the SQL scripts [1] and [2]: 

It seems that SQL scripts are defined for each hibernate dialect (and NOT for each database). Since MySQL and MariaDB share the same Hibernate dialect, is it safe to assume that the same SQL script would be used for both?

Based on that decision, we might need to revisit [3].

[1] https://github.com/droolsjbpm/jbpm/tree/master/jbpm-installer/db/ddl-scripts
[2] https://github.com/droolsjbpm/jbpm/tree/master/jbpm-installer/db/upgrade-scripts
[3] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-installer/src/test/java/org/jbpm/persistence/scripts/util/TestsUtil.java#L78

Version-Release number of selected component (if applicable):
BRMS 6.3.0 DR1

Steps to Reproduce:
1. run drools/jbpm tests with MariaDB

Actual results:
Datasource cannot be created.

Expected results:
Datasource is created successfully.
Comment 1 Marek Winkler 2016-02-16 08:51:54 EST
I see that

- org.drools.persistence.util.PersistenceUtil
- org.jbpm.persistence.util.PersistenceUtil

no longer exist on master (but do on 6.4.x). Would backporting the change from master be possible?
Comment 2 Marek Winkler 2016-02-16 08:55:05 EST
I see that the class PersistenceUtil has been moved to kie-test-util on master.
Comment 3 Marek Winkler 2016-02-16 09:02:55 EST
Created PR adding support for MariaDB to engine tests: https://github.com/droolsjbpm/drools/pull/649

The question about DDL scripts is still open.
Comment 5 Petr Široký 2016-03-17 18:30:37 EDT
Marek, am I assuming correctly that we need the same change in https://github.com/droolsjbpm/jbpm/blob/master/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/util/PersistenceUtil.java#L181 ? Since jBPM does not (yet) use the PersistenceUtil from kie-test-util, but rather has its own copy.
Comment 6 Marek Winkler 2016-03-18 02:34:14 EDT
Petr, yes, we need it there as well, thanks!
Comment 7 Petr Široký 2016-03-21 14:43:37 EDT
Fixed in Drools and jBPM repos. This should hopefully be enough. Marek, if you could double check there isn't anything missing, that would be great.

Commits (6.4.x):

Commits (master):
Comment 8 Marek Winkler 2016-04-01 09:51:54 EDT
The changes have helped, but it seems we have missed one more occurrence [1]. Sorry for not getting to this sooner.

[1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-core/src/test/java/org/jbpm/services/task/identity/DBUserGroupCallbackImplTest.java
Comment 9 Petr Široký 2016-04-04 18:40:34 EDT
Fixed the (hopefully) last occurrence.


Comment 10 Marek Winkler 2016-04-18 09:08:11 EDT
Verified in BRMS 6.3.0 ER3.

Note You need to log in before you can comment on or make changes to this bug.