SerializationTests::Actions started failing recently #17736

Open
opened 2026-01-31 05:51:52 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Jun 18, 2022).

Originally assigned to: @zadjii-msft on GitHub.

Windows Terminal version

Commit 848314ef17

Windows build number

10.0.19044.1706

Other Software

No response

Steps to reproduce

  1. Build a recent commit of OpenConsole (I think anything after 799b5d4add should do).
  2. Run the unit tests.

Expected Behavior

All the tests should pass.

Actual Behavior

There is a failure in SettingsModelLocalTests::SerializationTests::Actions when attempting to serialize the pair of findMatch actions. It seems that the commands are being reordered.

Click to see error
Error: Verify: AreEqual(toString(json), toString(result)) - Values ([
        {
                "command" :
                {
                        "action" : "findMatch",
                        "direction" : "next"
                },
                "keys" : "ctrl+shift+s"
        },
        {
                "command" :
                {
                        "action" : "findMatch",
                        "direction" : "prev"
                },
                "keys" : "ctrl+shift+r"
        }
], [
        {
                "command" :
                {
                        "action" : "findMatch",
                        "direction" : "prev"
                },
                "keys" : "ctrl+shift+r"
        },
        {
                "command" :
                {
                        "action" : "findMatch",
                        "direction" : "next"
                },
                "keys" : "ctrl+shift+s"
        }
])

I'm not sure if this is actually an indication of a bug - is the order of the commands expected to be retained? But at the very least I'd expect the test to be corrected if this is just an altered hash map order or something of that sort.

If it helps, I think the first time the test stopped working was after commit 799b5d4add.

Originally created by @j4james on GitHub (Jun 18, 2022). Originally assigned to: @zadjii-msft on GitHub. ### Windows Terminal version Commit 848314ef17419430153561016d1fabe912338844 ### Windows build number 10.0.19044.1706 ### Other Software _No response_ ### Steps to reproduce 1. Build a recent commit of OpenConsole (I think anything after 799b5d4add799ac2fbf5c855b774cd7dcb957697 should do). 2. Run the unit tests. ### Expected Behavior All the tests should pass. ### Actual Behavior There is a failure in `SettingsModelLocalTests::SerializationTests::Actions` when attempting to serialize the pair of `findMatch` actions. It seems that the commands are being reordered. <details> <summary>Click to see error</summary> ``` Error: Verify: AreEqual(toString(json), toString(result)) - Values ([ { "command" : { "action" : "findMatch", "direction" : "next" }, "keys" : "ctrl+shift+s" }, { "command" : { "action" : "findMatch", "direction" : "prev" }, "keys" : "ctrl+shift+r" } ], [ { "command" : { "action" : "findMatch", "direction" : "prev" }, "keys" : "ctrl+shift+r" }, { "command" : { "action" : "findMatch", "direction" : "next" }, "keys" : "ctrl+shift+s" } ]) ``` </details> I'm not sure if this is actually an indication of a bug - is the order of the commands expected to be retained? But at the very least I'd expect the test to be corrected if this is just an altered hash map order or something of that sort. If it helps, I think the first time the test stopped working was after commit 799b5d4add799ac2fbf5c855b774cd7dcb957697.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17736