Bug 108443
| Summary: | MimeTypeInitializer calls disableFilter() to disable INSOFilters regardless of which db is used | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Web Application Framework | Reporter: | Vadim Nasardinov <vnasardinov> |
| Component: | other | Assignee: | ccm-bugs-list |
| Status: | CLOSED EOL | QA Contact: | Jon Orris <jorris> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | nightly | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 16:51:55 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I get 14 test errors in XVersioningSuite because DbHelper.getDatabase() fails to return the right db. I hardcode the correct return value, then the tests pass. Here's a sample exception (the remaining 13 look about the same): Testcase: testSetSimple(com.arsdigita.versioning.VersioningEventProcessorTest): Caused an ERROR Database Default does not support varcharLength com.arsdigita.db.DbUnsupportedException: Database Default does not support varcharLength at com.arsdigita.db.DbHelper.unsupportedDatabaseError(DbHelper.java:213) at com.arsdigita.db.DbHelper.varcharLength(DbHelper.java:256) at com.arsdigita.versioning.DataObjectChange.newOperation(DataObjectChange.java:206) at com.arsdigita.versioning.DataObjectChange.recordEvent(DataObjectChange.java:174) at com.arsdigita.versioning.VersioningEventProcessor$EventSwitch.onCreate(VersioningEventProcessor.java:142) at com.redhat.persistence.CreateEvent.dispatch(CreateEvent.java:38) at com.arsdigita.versioning.VersioningEventProcessor.write(VersioningEventProcessor.java:70) at com.redhat.persistence.Session.flushInternal(Session.java:583) at com.redhat.persistence.Session.flush(Session.java:554) at com.arsdigita.persistence.DataObjectImpl.save(DataObjectImpl.java:421) at com.arsdigita.versioning.VersioningEventProcessorTest.testSetSimple(VersioningEventProcessorTest.java:104) Should be fixed with change 37522. QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future. Moving to ON_QA. |
Even if you use Oracle, MimeTypeInitializer always outputs the following warning when running unit tests or ccm-conf/ccm-pkg scripts: [junit] 2003-10-29 11:07:45,626 [ main] WARN mimetypes.MimeTypeInitializer - Had INSOFilterEnabled set to true when using a non Oracle database.This is not allowed. Setting to false. I changed the log statement to output the value of DbHelper.getDatabase(), like so: final boolean isNonOracleDB = DbHelper.getDatabase() != DbHelper.DB_ORACLE; if (isFilterEnabled() && isNonOracleDB) { s_log.warn("Had " + INSO_FILTER_WORKS + " set to true when using a non Oracle database." + "This is not allowed. Setting to false. " + "db=" + DbHelper.getDatabase()); disableFilter(); } It shows that DbHelper.getDatabase() returns 0, which is the value of DbHelper.DB_DEFAULT. So, regardless of what database you are actually using, DbHelper.getDatabase() returns DbHelper.DB_DEFAULT.