Skip to content

Faster tests #24948

Merged
harshach merged 20 commits intomainfrom
faster_tests_2
Dec 27, 2025
Merged

Faster tests #24948
harshach merged 20 commits intomainfrom
faster_tests_2

Conversation

@harshach
Copy link
Copy Markdown
Collaborator

@harshach harshach commented Dec 22, 2025

Describe your changes:

Fixes

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Comment thread .github/workflows/integration-tests-mysql-elasticsearch.yml Fixed
Comment thread .github/workflows/integration-tests-mysql-elasticsearch.yml Fixed
Comment thread .github/workflows/integration-tests-postgres-opensearch.yml Fixed
Comment thread .github/workflows/integration-tests-postgres-opensearch.yml Fixed
Comment on lines +89 to +97
- name: Install Ubuntu dependencies
if: steps.cache-output.outputs.exit-code == 0
run: |
sudo apt-get update
sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
librdkafka-dev unixodbc-dev libevent-dev jq
sudo make install_antlr_cli

- name: Build with Maven

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
Comment on lines +97 to +102
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -DskipTests clean install -pl '!openmetadata-ui,!openmetadata-docs,!openmetadata-docs-v1' -am

- name: Run Integration Tests (MySQL + Elasticsearch)

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
Comment on lines +102 to +107
- name: Run Integration Tests (MySQL + Elasticsearch)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn test -pl :openmetadata-integration-tests -Pmysql-elasticsearch

- name: Clean Up

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
Comment on lines +89 to +97
- name: Install Ubuntu dependencies
if: steps.cache-output.outputs.exit-code == 0
run: |
sudo apt-get update
sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
librdkafka-dev unixodbc-dev libevent-dev jq
sudo make install_antlr_cli

- name: Build with Maven

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
Comment on lines +97 to +102
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -DskipTests clean install -pl '!openmetadata-ui,!openmetadata-docs,!openmetadata-docs-v1' -am

- name: Run Integration Tests (PostgreSQL + OpenSearch)

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
Comment on lines +102 to +107
- name: Run Integration Tests (PostgreSQL + OpenSearch)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn test -pl :openmetadata-integration-tests -Ppostgres-opensearch

- name: Clean Up

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Dec 27, 2025

Code Review 👍 Approved with suggestions

Major integration testing framework addition with comprehensive SDK enhancements. Well-structured parallel test infrastructure with only minor documentation concerns.

Suggestions 💡 2 suggestions
Code Quality: Migration tracker documentation still committed to repository

📄 openmetadata-integration-tests/TEST_MIGRATION_TRACKER.md

The file openmetadata-integration-tests/TEST_MIGRATION_TRACKER.md (244 lines) is a development tracking document that appears to be internal documentation for tracking the migration of tests from the old framework to the new one. This contains development notes, checkmarks, and progress tracking.

This type of documentation is typically maintained externally (in issues/PRs/project management tools) rather than committed to the repository. Having it in the codebase:

  1. Creates maintenance burden to keep it updated
  2. May become outdated and confusing for future contributors
  3. Contains development progress that has no value once the migration is complete

Consider removing this file and tracking the migration status in the PR description or an external tracking issue instead.

Security: Test credentials hardcoded in bootstrap code

📄 openmetadata-integration-tests/src/test/java/org/openmetadata/it/bootstrap/TestSuiteBootstrap.java:83-91

The TestSuiteBootstrap contains hardcoded test credentials that, while only used in test environments, could be concerning:

private static final String ELASTIC_PASSWORD = "password";
private static final String FUSEKI_ADMIN_PASSWORD = "test-admin";

These are acceptable for test infrastructure, but consider:

  1. Adding comments explicitly stating these are TEST-ONLY credentials
  2. Document in the README that these should never be used in production contexts
  3. Consider using environment variable overrides for CI environments if needed

This is low severity since these are clearly for test containers and won't be deployed to production, but the pattern should be documented to prevent confusion.

Resolved ✅ 2 resolved
Code Quality: Backup files (.bak, .backup, .bak2) still committed to repository

📄 openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TableResourceIT.java.backup 📄 openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TableResourceIT.java.bak 📄 openmetadata-sdk/src/main/java/org/openmetadata/sdk/client/OpenMetadataClient.java.bak 📄 openmetadata-sdk/src/main/java/org/openmetadata/sdk/client/OpenMetadataClient.java.bak2
Several backup files are still included in this PR, which should not be committed to version control:

  1. openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TableResourceIT.java.backup
  2. openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TableResourceIT.java.bak
  3. openmetadata-sdk/src/main/java/org/openmetadata/sdk/client/OpenMetadataClient.java.bak
  4. openmetadata-sdk/src/main/java/org/openmetadata/sdk/client/OpenMetadataClient.java.bak2

Impact: These files increase repository size unnecessarily, may cause confusion, and could potentially contain stale/incorrect code that shouldn't be referenced.

Suggested fix: Remove these backup files before merging:

git rm openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TableResourceIT.java.backup
git rm openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TableResourceIT.java.bak
git rm openmetadata-sdk/src/main/java/org/openmetadata/sdk/client/OpenMetadataClient.java.bak
git rm openmetadata-sdk/src/main/java/org/openmetadata/sdk/client/OpenMetadataClient.java.bak2

Also add these patterns to .gitignore:

*.bak
*.backup
*.bak2
Code Quality: Excessive migration tracking documentation files committed

📄 openmetadata-integration-tests/MIGRATION_AUDIT.md 📄 openmetadata-integration-tests/MIGRATION_STATUS.md 📄 openmetadata-integration-tests/TEST_MIGRATION_TRACKER.md
Multiple migration tracking and status documentation files are being added to the repository:

  1. openmetadata-integration-tests/MIGRATION_AUDIT.md
  2. openmetadata-integration-tests/MIGRATION_COMPLETE_SUMMARY.md
  3. openmetadata-integration-tests/MIGRATION_REPORT.md
  4. openmetadata-integration-tests/MIGRATION_STATUS.md
  5. openmetadata-integration-tests/TEST_MIGRATION_TRACKER.md
  6. openmetadata-integration-tests/TEST_MIGRATION_STATUS.md
  7. openmetadata-integration-tests/TEST_MIGRATION_AUDIT.md
  8. openmetadata-integration-tests/TEST_COVERAGE_GAP_ANALYSIS.md
  9. openmetadata-integration-tests/SDK_CAPABILITIES_ANALYSIS.md
  10. openmetadata-integration-tests/VALIDATION_FRAMEWORK_IMPLEMENTATION.md
  11. openmetadata-integration-tests/VALIDATION_GAP_ANALYSIS.md
  12. openmetadata-integration-tests/COMPLETE_MIGRATION_PLAN.md
  13. ADDED_TESTS_SUMMARY.md

Impact: These appear to be internal development tracking documents that add significant noise to the repository. Most of this information would be better suited for a project tracking system (e.g., GitHub Issues, Jira) or should be consolidated into a single README.

Suggested fix: Consider keeping only the README.md which provides user-facing documentation about the test module. Remove or consolidate the tracking documents, or move them to a /docs/internal/ directory if they need to be preserved for historical reference.

What Works Well

Excellent Test Infrastructure Design: The TestSuiteBootstrap with LauncherSessionListener ensures containers start once per session, not per test class, enabling efficient parallel execution.

Clean Fluent SDK APIs: New fluent builders (DataContracts, AIApplications, TestCases, etc.) provide a readable, chainable API pattern that improves SDK usability significantly.

Robust Concurrency Handling: The MySQL deadlock fix (INSERT ... ON DUPLICATE KEY UPDATE replacing INSERT IGNORE) addresses a real production issue. TestNamespace isolation pattern ensures parallel tests don't interfere.

Well-Organized Module: The new openmetadata-integration-tests module is properly structured with Maven profiles for different database/search combinations, comprehensive documentation in README, and sensible defaults.

Recommendations

Consider adding explicit test-only comments around hardcoded credentials in bootstrap code to prevent any future confusion about their purpose.

Options

Auto-apply is off Gitar will not commit updates to this branch.
✅ Code review is on Gitar will review this change.
Display: compact Hiding non-applicable rules.

Comment with these commands to change:

Auto-apply ✅ Code review Compact
gitar auto-apply:on         
gitar code-review:off         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)

@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@harshach harshach merged commit ab53590 into main Dec 27, 2025
39 of 47 checks passed
@harshach harshach deleted the faster_tests_2 branch December 27, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants