Add comprehensive test suite for duplicate identifier bug fix#4
Open
adamjohnwright wants to merge 1 commit into
Open
Add comprehensive test suite for duplicate identifier bug fix#4adamjohnwright wants to merge 1 commit into
adamjohnwright wants to merge 1 commit into
Conversation
This commit adds a complete test suite to validate the duplicate identifier bug fix implemented in PR #3. The tests ensure that the fix prevents duplicate identifiers from being created when isoforms and canonical proteins share the same dbId. Tests Added: - ReferenceCreatorTest: Tests core duplicate prevention mechanisms * dbId-based mapping vs object identity (main bug fix) * In-memory CSV deduplication using Set * Relationship line creation for all source mappings * Multiple run duplicate prevention - DatabaseIdentifierReferenceCreatorTest: Tests DatabaseIdentifier caching * fetchOrCreate pattern validation * Cache isolation by ReferenceDatabase * No duplicate objects in memory - ReferenceSequenceReferenceCreatorTest: Tests ReferenceSequence caching * Reference sequence creation and caching * Cache behavior documentation * Multiple sources sharing identifiers - DuplicatePreventionIntegrationTest: End-to-end integration tests * Simulates exact bug scenario (isoforms with same dbId) * Multiple sources with shared external identifiers * Complete workflow validation Infrastructure Improvements: - Migrate to JUnit 5.9.3 from outdated milestone version - Update Mockito to 4.11.0 with JUnit 5 integration - Add maven-surefire-plugin 2.22.2 for proper JUnit 5 support - Add comprehensive TEST_README.md documentation Test Coverage: - 4 test classes - 17 test methods - Covers dbId mapping, CSV deduplication, caching, and integration scenarios Related to PR #3: bug-fix/duplicate-identifiers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
This commit adds a complete test suite to validate the duplicate identifier bug fix implemented in PR #3. The tests ensure that the fix prevents duplicate identifiers from being created when isoforms and canonical proteins share the same dbId.
Tests Added:
ReferenceCreatorTest: Tests core duplicate prevention mechanisms
DatabaseIdentifierReferenceCreatorTest: Tests DatabaseIdentifier caching
ReferenceSequenceReferenceCreatorTest: Tests ReferenceSequence caching
DuplicatePreventionIntegrationTest: End-to-end integration tests
Infrastructure Improvements:
Test Coverage:
Related to PR #3: bug-fix/duplicate-identifiers
🤖 Generated with Claude Code