refactor(task): enhance UpdateWithStatus for CAS updates and add integration tests
- 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.
Showing
model/task_cas_test.go
0 → 100644
service/task_billing_test.go
0 → 100644
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment