Aias00 commented on PR #7544:
URL: https://github.com/apache/shenyu/pull/7544#issuecomment-6234997766
Follow-up with a ready-to-apply fix for the `pr_build` failure I flagged.
The two **init** cases reference files that do not exist:
- `db/init/ob/schema.sql`
- `db/init/og/create-table.sql`
`db/init/` only contains `mysql/`, `oracle/`, `pg/` (verified on `master`).
OceanBase reuses the MySQL fresh-install script and openGauss reuses the PG
one, so those two cases are redundant — the `mysql init` / `pg init` cases
already assert those exact files. Keep the `ob`/`og` **upgrade** cases
(`db/upgrade/2.7.1-upgrade-2.7.2-ob.sql` and `-og.sql` do exist).
Suggested change in `OperationLogIndexContractTest.scripts()`:
```diff
Arguments.of("mysql", "init", "db/init/mysql/schema.sql",
createIndex("idx_operation_log_time", TIME),
createIndex("idx_operation_log_operator_time",
OPERATOR_TIME)),
- Arguments.of("ob", "init", "db/init/ob/schema.sql",
- createIndexBtree("idx_operation_log_time", TIME),
- createIndexBtree("idx_operation_log_operator_time",
OPERATOR_TIME)),
Arguments.of("pg", "init", "db/init/pg/create-table.sql",
pgIndex("idx_operation_log_time", TIME),
pgIndex("idx_operation_log_operator_time",
"operator,operation_time")),
- Arguments.of("og", "init", "db/init/og/create-table.sql",
- pgIndex("idx_operation_log_time", TIME),
- pgIndex("idx_operation_log_operator_time",
"operator,operation_time")),
Arguments.of("oracle", "init", "db/init/oracle/schema.sql",
createIndex("idx_operation_log_time", TIME),
createIndex("idx_operation_log_operator_time",
OPERATOR_TIME)),
```
(If you would rather keep explicit OB/OG *init* coverage, point those cases
at `db/init/mysql/schema.sql` and `db/init/pg/create-table.sql` respectively —
but that duplicates the existing `mysql`/`pg` cases, so removing them is
cleaner.)
This removes the two `NoSuchFileException`s and turns `pr_build` green:
```
[shenyu-admin] [ERROR] Tests run: 10, Failures: 0, Errors: 2
java.nio.file.NoSuchFileException: .../db/init/ob/schema.sql
java.nio.file.NoSuchFileException: .../db/init/og/create-table.sql
[INFO] BUILD FAILURE
```
Also note this overlaps with #7404 (same `operation_record_log` indexes,
same ob/og/oracle/pg scripts) — please coordinate which PR lands to avoid
duplicate index declarations on a fresh install.
--
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]