test(mysql): add Lock/Omit/Cache/Batch tests#4706
Open
lingcoder wants to merge 1 commit intogogf:masterfrom
Open
test(mysql): add Lock/Omit/Cache/Batch tests#4706lingcoder wants to merge 1 commit intogogf:masterfrom
lingcoder wants to merge 1 commit intogogf:masterfrom
Conversation
88fe47e to
807f718
Compare
Add comprehensive tests for Lock, Omit, Cache, and Batch features. ## New Test Coverage ### Lock Tests (mysql_z_unit_feature_lock_test.go) - Lock() for SELECT FOR UPDATE - LockUpdate() for SELECT FOR UPDATE - Lock with LOCK IN SHARE MODE (MySQL 5.7+ compatible) - Lock behavior in transactions - Note: MySQL 8.0+ features (FOR SHARE, SKIP LOCKED) excluded for compatibility ### Omit Tests (mysql_z_unit_feature_omit_test.go) - OmitEmpty() filtering - OmitNil() filtering - OmitNilData() filtering (Map-based) - OmitEmptyData() filtering - Combination with Fields/FieldsEx ### Cache Tests (mysql_z_unit_feature_cache_test.go) - Cache() basic operations - Cache with different durations - Cache invalidation on write - Cache with transactions ### Batch Tests (mysql_z_unit_feature_batch_test.go) - Batch() insert operations - BatchSave() operations - Large batch processing - Batch with transactions ## Total Added ~30 test functions across 4 files, 1200+ lines Ref gogf#4689
807f718 to
344b08e
Compare
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.
Summary
Test coverage added: ~34 test functions across 4 files
Ref #4689
Test plan