You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
controllers/token: Order by id instead of created_at (#7181)
In a real world scenario this should not make a huge difference, since `id` is a monotonically increasing counter, so the order should be the same as with `created_at`. We do have the unique `id` index though, which might be used by the database to speed up the query.
The main reason for this change is to ensure a stable sort order for our test suite. The `list_tokens()` test case has been a bit flaky lately (see https://github.com/rust-lang/crates.io/actions/runs/6305682314/job/17119535543?pr=7178) because the `created_at` column for all tokens is the same during a test, due to each test running within a Postgres transaction. The `id` however won't be the same, so we can achieve a stable sort order that way.
0 commit comments