test: gate version history tests on supportsVersionHistory flag#27675
Merged
test: gate version history tests on supportsVersionHistory flag#27675
Conversation
Version history integration tests in BaseEntityIT were gated only on supportsPatch, causing UnsupportedOperationException for entities that support patch but do not implement version endpoints (Announcement, TaskFormSchema, Task). Gate them on supportsVersionHistory and disable the flag for the 3 affected entities. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Code Review ✅ ApprovedGates version history tests on the supportsVersionHistory flag to ensure test execution aligns with feature availability. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
TeddyCr
approved these changes
Apr 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates integration tests to avoid running version-history test cases for entity types that don’t (currently) satisfy the shared BaseEntityIT version-history expectations, preventing UnsupportedOperationException failures after recent Task/version-history changes.
Changes:
- Gate
BaseEntityITversion-history tests onsupportsVersionHistory(andsupportsGetByVersionwhere applicable), in addition tosupportsPatch. - Disable version-history and get-by-version test coverage flags in
TaskResourceIT,TaskFormSchemaResourceIT, andAnnouncementResourceIT.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/BaseEntityIT.java | Tightens version-history test gating using explicit capability flags. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TaskResourceIT.java | Disables shared version-history tests for Task IT. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TaskFormSchemaResourceIT.java | Disables shared version-history tests for TaskFormSchema IT. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/AnnouncementResourceIT.java | Disables shared version-history tests for Announcement IT. |
Comment on lines
+128
to
+129
| supportsVersionHistory = false; | ||
| supportsGetByVersion = false; |
Comment on lines
+46
to
48
| supportsVersionHistory = false; | ||
| supportsGetByVersion = false; | ||
| } |
| supportsSearchIndex = false; | ||
| supportsVersionHistory = true; | ||
| supportsVersionHistory = false; | ||
| supportsGetByVersion = false; |
Contributor
🔴 Playwright Results — 2 failure(s), 19 flaky✅ 3944 passed · ❌ 2 failed · 🟡 19 flaky · ⏭️ 86 skipped
Genuine Failures (failed on all attempts)❌
|
jatinmasaram
pushed a commit
to jatinmasaram/OpenMetadata
that referenced
this pull request
May 2, 2026
…data#27675) Version history integration tests in BaseEntityIT were gated only on supportsPatch, causing UnsupportedOperationException for entities that support patch but do not implement version endpoints (Announcement, TaskFormSchema, Task). Gate them on supportsVersionHistory and disable the flag for the 3 affected entities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes:
After the Task redesign and version history PRs merged, integration tests for
AnnouncementResourceIT,TaskFormSchemaResourceIT, andTaskResourceITstarted failing withUnsupportedOperationException: version history not implemented - override in subclass. The version history tests inBaseEntityITwere gated only onsupportsPatch, but these entities support patch without exposing version endpoints. Gated all version history tests onsupportsVersionHistory(andsupportsGetByVersionwhere relevant) and set those flags tofalseon the three affected IT classes.Type of change:
Checklist: