task_cas_test.go
5.54 KB
-
refactor(task): enhance UpdateWithStatus for CAS updates and add integration tests · 374aabf3
- Updated UpdateWithStatus method to use Model().Select("*").Updates() for conditional updates, preventing GORM's INSERT fallback. - Introduced comprehensive integration tests for UpdateWithStatus, covering scenarios for winning and losing CAS updates, as well as concurrent updates. - Added task_cas_test.go to validate the new behavior and ensure data integrity during concurrent state transitions.CaIon committed