Skip to content

test: add regression test framework with CI for contributors#316

Open
rophy wants to merge 3 commits intobersler:masterfrom
rophy:test-framework
Open

test: add regression test framework with CI for contributors#316
rophy wants to merge 3 commits intobersler:masterfrom
rophy:test-framework

Conversation

@rophy
Copy link

@rophy rophy commented Mar 1, 2026

Motivation

I know that OLR has a "private, proprietary test suite with 1,000+ edge-case scenarios", which is nice.

This PR is NOT meant to replace existing test coverage. Instead, just to provide a basic safety net for contributions.

This PR adds a lightweight regression test framework that:

  • Gives contributors or forked projects a way to verify changes locally
  • Gives author (bersler) and contributors a way to know whether pull requests breaks something basic, via automated CI checks.

What's included

  • Fixture pipeline (generate.sh): captures redo logs + golden output from a live Oracle instance
  • Parameterized gtest (test_pipeline.cpp): replays captured redo logs against golden files — no Oracle needed at test time
  • 2 Oracle environments: Free 23ai and XE 21c, with some basic SQL test scenarios
  • GitHub Actions workflows:
    • sql-tests-*: spins up Oracle in Docker, runs SQL scenarios, captures redo logs and golden output as artifacts. Runs on pushes to the test branch.
    • redo-log-tests: downloads the captured fixtures, builds OLR, replays redo logs and compares output against golden files. Runs on PRs — no Oracle needed.

See how the GHA workflows work in my fork: Redo Logs Test, SQL Tests against Free 23ai

Workflow for contributors

  1. Make changes to OLR
  2. Run tests locally (replays pre-built fixtures, no Oracle needed)
  3. Open PR → GitHub Actions runs regression tests automatically
  4. Optionally generate new fixtures with a running Oracle instance

rophy added 3 commits March 1, 2026 06:15
Docker-based test infrastructure for OLR regression testing:
- Dockerfile.dev: dev image with all deps + gtest
- Per-environment configs in tests/1-environments/ (free-23 first)
- generate.sh: 7-stage pipeline (SQL → redo capture → schema →
  LogMiner → OLR → compare → golden file)
- test_pipeline.cpp: parameterized gtest, auto-discovers fixtures
  from both 2-prebuilt/ (Git LFS) and 3-generated/ (CI artifact)
- compare.py: content-based OLR vs LogMiner matching
- CI: sql-tests-free23 (generates fixtures), redo-log-tests (replays)
- Includes basic-crud scenario as initial SQL test input
concurrent-updates, data-types, ddl-add-column,
interleaved-transactions, large-transaction, lob-operations,
long-spanning-txn, many-columns, multi-table, null-handling,
number-precision, partitioned-table, rollback, special-chars,
timestamp-variants, wide-rows
- tests/1-environments/xe-21/ with PDB=XEPDB1
- sql-tests-xe21.yaml CI workflow
- redo-log-tests downloads from both free-23 and xe-21
- All 17 scenarios pass on XE 21.3.0
@rophy
Copy link
Author

rophy commented Mar 1, 2026

@bersler I have been using Debezium + LogMiner in my corporate envs for quite some time, and like everyone else that came to you, I am evaluating whether the envs can benefit from integrating with OLR.

Reading the "Important Note on AI-Generated Patches and Forks" section in README, I guess you likely have received some AI-made contriutions without proper verifications, and likely asked or expected YOU to do the verification.

Having a test framework backed with public visible CI pipeline helps in the way that you can request contributors to contribute in the form of test cases. Hope that helps.

Disclaimer: this PR is created by AI (Claude) as well. I did not take a careful look at the test cases, but they look basic enough, and being docker-based helps to have consistent results across everyone's machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant