Skip to content

Add chaos testing scripts and verification scenarios for SQLite and SQL Server#80

Closed
isdaniel wants to merge 5 commits into
mainfrom
chore/add-sqlserver-sqlite-integration-test
Closed

Add chaos testing scripts and verification scenarios for SQLite and SQL Server#80
isdaniel wants to merge 5 commits into
mainfrom
chore/add-sqlserver-sqlite-integration-test

Conversation

@isdaniel
Copy link
Copy Markdown
Owner

  • Introduced scenario5_verify.sql to verify high-volume data replication (3M rows) in SQL Server.
  • Created run_chaos_tests_sqlite.sh for executing chaos tests with SQLite as the destination.
  • Developed run_chaos_tests_sqlserver.sh for executing chaos tests with SQL Server as the destination.
  • Implemented run_pgbench_chaos_test_sqlite.sh for performance testing with pgbench on SQLite.
  • Implemented run_pgbench_chaos_test_sqlserver.sh for performance testing with pgbench on SQL Server.
  • Added logging and cleanup functionalities to all scripts for better traceability and resource management.

…QL Server

- Introduced `scenario5_verify.sql` to verify high-volume data replication (3M rows) in SQL Server.
- Created `run_chaos_tests_sqlite.sh` for executing chaos tests with SQLite as the destination.
- Developed `run_chaos_tests_sqlserver.sh` for executing chaos tests with SQL Server as the destination.
- Implemented `run_pgbench_chaos_test_sqlite.sh` for performance testing with pgbench on SQLite.
- Implemented `run_pgbench_chaos_test_sqlserver.sh` for performance testing with pgbench on SQL Server.
- Added logging and cleanup functionalities to all scripts for better traceability and resource management.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request expands the project's testing capabilities by adding support for SQLite and SQL Server destinations. It includes new Docker Compose files, environment configurations, and initialization scripts, alongside significant Makefile updates to manage chaos and performance testing for these new targets. The review feedback identifies critical bugs in shell script environment parsing that would fail with spaces in connection strings and highlights a common Bash pitfall where the "local" keyword masks command exit statuses, potentially bypassing error handling.

Comment thread tests/chaos/scripts/run_chaos_tests_sqlserver.sh Outdated
Comment thread tests/chaos/scripts/run_pgbench_chaos_test_sqlserver.sh Outdated
Comment thread tests/chaos/scripts/run_chaos_tests_sqlserver.sh Outdated
Comment thread tests/chaos/scripts/run_chaos_tests_sqlite.sh Outdated
Comment thread tests/chaos/scripts/run_pgbench_chaos_test_sqlite.sh Outdated
Comment thread tests/chaos/scripts/run_pgbench_chaos_test_sqlserver.sh Outdated
@isdaniel
Copy link
Copy Markdown
Owner Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request expands the project's testing capabilities by introducing dedicated chaos and performance testing suites for SQL Server and SQLite destinations. The changes include new Docker Compose environments, destination-specific configuration files, and automated test runners. The review feedback highlights several areas for improvement: addressing security risks associated with hardcoded credentials, reducing extensive code duplication in the new shell scripts and Makefile, centralizing complex health check logic, and replacing magic numbers in SQL verification scripts with variables to enhance maintainability.

Comment thread env/.env.sqlserver
Comment thread tests/chaos/scripts/run_chaos_tests_sqlite.sh
Comment thread Makefile
Comment thread docker-compose.chaos-test-sqlserver.yml
Comment thread tests/chaos/scenarios/verify_sqlserver/scenario5_verify.sql
…e expected row count logic and improve variable usage in chaos test scripts
@isdaniel
Copy link
Copy Markdown
Owner Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive chaos and performance testing for SQL Server and SQLite destinations, including new Docker Compose setups, environment configurations, and automated test scripts. The build process is also updated to support conditional compilation of destination features via Docker build arguments. Feedback focuses on improving the reliability of test cleanup scripts during container restarts, removing unused code, and refactoring the Makefile to eliminate duplication and hardcoded credentials.

Comment thread tests/chaos/scripts/run_chaos_tests_sqlite.sh
Comment thread tests/chaos/scripts/run_chaos_tests_sqlserver.sh Outdated
Comment thread Makefile Outdated
Comment thread Makefile
…e and SQL Server; streamline code by using 'set -a' and 'source'
@isdaniel isdaniel closed this Apr 26, 2026
@isdaniel isdaniel deleted the chore/add-sqlserver-sqlite-integration-test branch April 26, 2026 10:12
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