smolnar82 opened a new pull request, #1382: URL: https://github.com/apache/knox/pull/1382
[KNOX-3440](https://issues.apache.org/jira/browse/KNOX-3440) - Remove HSQLDB completely from Knox ## What changes were proposed in this pull request? As part of [KNOX-3401](https://issues.apache.org/jira/browse/KNOX-3401), H2 became the new OOTB embedded database in Knox. HSQLDB was originally introduced (#567 ) only because Apache Derby lacks `IF NOT EXISTS`. H2 supports `IF NOT EXISTS`, so HSQLDB is now redundant and can be removed, including the test-only dependency it was kept around for. This PR removes HSQLDB entirely: - **Main code**: dropped the `HSQL` value from `DatabaseType`, removed its branch in `DataSourceProvider`, deleted `HsqlDataSourceFactory`, and updated a stale comment in `KnoxDatabase`. - **Maven**: removed the `hsql.db.version` property and the `org.hsqldb:hsqldb` managed dependency in the root POM; removed the `provided` hsqldb dependency from `gateway-server`; swapped the hsqldb test dependency in `gateway-shell` for H2. - **Tests**: converted every HSQLDB-backed test to H2 (`KnoxShellTableTest`, `KnoxDatabaseTest`, `RemoteConfigDatabaseTest`, `JDBCTokenStateServiceTest`). The two KnoxIDF schema tests (`DelegationPolicySchemaTest`, `TrustedOidcIssuersSchemaTest`) that previously ran the same standard DDL against both H2 and HSQLDB were consolidated onto a single H2 connection; the delegation schema test gained a child-first `@After` truncate so the "empty after DDL" assertion stays independent of JUnit method order. - **Docs**: removed `hsql`/`HSQL` from the supported database types, the SSL caveat, and the bundled-drivers note in `config_knox_token.md`. Note: `gateway.database.type=hsql` was a user-facing (embedded/test-oriented) option, so this removes a supported type - consistent with the KNOX-3401/KNOX-3440 direction of making H2 the OOTB embedded backend. ## How was this patch tested? - `mvn -pl gateway-server,gateway-shell -am test-compile` — both modules compile. - Ran all affected unit tests (all pass): - `gateway-server`: `DataSourceProviderTest` (20), `KnoxDatabaseTest` (5), `RemoteConfigDatabaseTest` (6), `JDBCTokenStateServiceTest` (9), `DelegationPolicySchemaTest` (11), `TrustedOidcIssuersSchemaTest` (2). - `gateway-shell`: `KnoxShellTableTest` (32). - Verified `grep -rniI "hsql"` over source, build files, and docs returns no live references (only historical `CHANGES`/Hadoop changelog entries remain, which are intentionally left untouched). ## Integration Tests No new integration tests required: this is a dependency/backend removal fully covered by the existing unit tests, which were converted from HSQLDB to H2 in this PR. Existing end-to-end suite already exercises paths where the new H2 DB is tested. ## UI changes N/A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
