Commit c76dcd1
committed
Sort topics in test
The issue is related to map key ordering changes introduced in OTP 26.
Erlang made internal changes to optimize map operations by changing the internal sort order of atom keys. As stated in the Erlang OTP Release Notes:
> Some map operations have been optimized by changing the internal sort order of atom keys. This changes the (undocumented) order of how atom keys in small maps are printed and returned. The new order is unpredictable and may change between different invocations of the Erlang VM.
Elixir 1.14.4 acknowledged this change in its release notes:
> When migrating to Erlang/OTP 26, keep in mind it changes how maps are stored internally and they will be printed and traversed in a different order (note maps never provided a guarantee of their order).
The test was failing because it assumed a specific order of keys, but with OTP 26's changes, the order is now unpredictable and can be different between runs, and therefore I sorted the keys before comparison to get a deterministic test result.1 parent 011e057 commit c76dcd1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments