Files
mattermost/server
5ad66d3f76 Fix flaky TestUpdatePropertyValues_WriteAccessControl (#36784)
* Fix flaky TestUpdatePropertyValues_WriteAccessControl

GetPropertyValues delegates to PropertyValueStore.GetMany, which does not
preserve the caller's ID slice order. Subtests asserted on retrieved[0] and
retrieved[1] by position, so a planner that returns rows sorted by ID or
UpdateAt (e.g. with idx_propertyvalues_groupid_updateat_id) could swap
values and fail intermittently.

Look up returned values by ID before comparing JSON payloads.

Tests-only change. Verified with `go test -run '^TestUpdatePropertyValues_WriteAccessControl$' -race -count=100` locally.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Refactor property value test helper

Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>

* Remove redundant property test nil checks

Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>
2026-05-29 08:53:34 +00:00
..
2026-05-20 13:21:14 -03:00
2026-04-21 02:33:20 -07:00