Skip to content

2.29.0.0-b86

@jaki jaki tagged this 22 Oct 19:24
Summary:
The src/postgres/src/test/regress directory accumulated tests in an
unorganized fashion such that certain files have been placed where they
shouldn't be.  Move such files to better locations:

- yb_commands: Some yb.orig regress tests use \i to read a common file
  of SQL commands.  The SQL file was named as data/yb.orig.*.sql.  The
  data directory should ideally not have *.sql files.  Move these files
  to a new directory yb_commands.  Remove the yb.orig. prefix now that
  it's no longer needed as the directory name has yb prefix.
- java/yb-pgsql/src/test/resources:
  - TestYsqlDump.java: TestYsqlDump.java has been a mess.  One
    particular annoyance was that it abused the src/test/regress
    directory with files that don't actually use the pg_regress test
    framework.  Move all these files out to a better place:
    java/yb-pgsql/src/test/resources/TestYsqlDump.  Defer renaming and
    further cleanup for later.  The results directory is generated under
    this directory's counterpart in the target directory, namely
    java/yb-pgsql/target/test-classes/TestYsqlDump.

    Note that there is one test file
    data/yb_ysql_dumpall_with_dump_role_checks.data.sql that was
    orphaned by commit 0a885f0fef799b3ea010c34c85084ecd9f32b7a9.  Still,
    move it over and hope that the authors of that commit fix the
    discrepancy in the future.
  - TestYbBackup.java: Commit 6e78b8644c39c72dbce8b248bf818f28f297e78c
    did a good job of moving test files out of
    src/test/regress/{sql,expected} into src/test/regress/backup, but go
    a step further and move it to
    java/yb-pgsql/src/test/resources/TestYbBackup as done for
    TestYsqlDump.

Finally, update the pg buildstamp to ignore the new test files and
update src/test/regress/README with extra info.

Jira: DB-18760

Test Plan:
On Almalinux 8:
    #!/usr/bin/env bash
    set -euo pipefail

    ./yb_build.sh "$@" daemons initdb --skip-pg-parquet
    ./yb_build.sh "$@" --skip-pg-parquet --java-only
    for test in TestPgRegressJoin TestPgRegressIndex TestPgRegressPlanner \
                TestYsqlDump \
                org.yb.pgsql.TestYbBackup\#testBackupRoleParameter \
                org.yb.pgsql.TestYbBackup\#testBackupRoles; do
      ./yb_build.sh "$@" daemons initdb --skip-pg-parquet \
        --java-test "$test" --sj
    done

Note lack of org.yb.pgsql.TestYbBackup\#testBackupRoles due to the test
being broken (issue #27351).

Close: #29012

Reviewers: loginov, ssharma, sanketh

Reviewed By: loginov

Subscribers: kramanathan, smishra, mihnea, sanketh, yql

Differential Revision: https://phorge.dev.yugabyte.com/D47609
Assets 2
Loading