YS-L/csvlens

The `test_sorting` and `test_sorting_with_filter` tests fails with `cargo test`

jqnatividad opened this issue · 13 comments

per the title

YS-L commented

Could you share more details on the failures? They seem to work fine locally for me and on CI.

I get these errors on main, running cargo test on macOS 15.1 Beta.

failures:

---- app::tests::test_carriage_returns stdout ----
thread 'app::tests::test_carriage_returns' panicked at src/app.rs:1511:9:
assertion `left == right` failed
  left: ["──────────────────────────────────────────────────", "      a    b                      c               ", "───┬─────────────────────────────────────────────┬", "1  │  1    this is a very         12345          │", "   │       long text that                        │", "   │       surely will not                       │", "   │       fit in your small                     │", "   │       screen                                │", "2  │  2    this\r                  678910         │", "   │                                             │", "   │       is\r                                   │", "   │                                             │", "   │       an\r                                   │", "   │                                             │", "   │       even\r                                 │", "   │                                             │", "   │       longer\r                               │", "   │                                             │", "   │       text\r                                 │", "   │                                             │", "   │       that\r                                 │", "   │                                             │", "   │       surely\r                               │", "   │                                             │", "   │       will\r                                 │", "   │                                             │", "   │       not\r                                  │", "   │                                             │", "   │       fit\r                                  │", "   │                                             │", "   │       in\r                                   │", "   │                                             │", "   │       your\r                                 │", "   │                                             │", "   │       small\r                                │", "   │                                             │", "   │       screen                                │", "3  │  3    normal text now        123,456,789    │", "   │                                             │", "   │                                             │", "   │                                             │", "   │                                             │", "   │                                             │", "───┴─────────────────────────────────────────────┴", "Word wrap enabled                                 "]
 right: ["──────────────────────────────────────────────────", "      a    b                      c               ", "───┬─────────────────────────────────────────────┬", "1  │  1    this is a very         12345          │", "   │       long text that                        │", "   │       surely will not                       │", "   │       fit in your small                     │", "   │       screen                                │", "2  │  2    this                   678910         │", "   │                                             │", "   │       is                                    │", "   │                                             │", "   │       an                                    │", "   │                                             │", "   │       even                                  │", "   │                                             │", "   │       longer                                │", "   │                                             │", "   │       text                                  │", "   │                                             │", "   │       that                                  │", "   │                                             │", "   │       surely                                │", "   │                                             │", "   │       will                                  │", "   │                                             │", "   │       not                                   │", "   │                                             │", "   │       fit                                   │", "   │                                             │", "   │       in                                    │", "   │                                             │", "   │       your                                  │", "   │                                             │", "   │       small                                 │", "   │                                             │", "   │       screen                                │", "3  │  3    normal text now        123,456,789    │", "   │                                             │", "   │                                             │", "   │                                             │", "   │                                             │", "   │                                             │", "───┴─────────────────────────────────────────────┴", "Word wrap enabled                                 "]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- app::tests::test_sorting stdout ----
thread 'app::tests::test_sorting' panicked at src/app.rs:1824:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM [▴]      LatS    NS    LonD    LonM    LonS    EW    C…    ", "─────┬──────────────────────────────────────────────────────────────────────────", "118  │  44      1             12      N     92      27      35      W     R…    ", "49   │  39      2             59      N     95      40      11      W     T…    ", "56   │  43      2             59      N     76      9       0       W     S…    ", "16   │  40      4             11      N     80      43      12      W     W…    ", "29   │  46      4             11      N     118     19      48      W     W…    ", "─────┴──────────────────────────────────────────────────────────────────────────", "stdin [Row 118/128, Col 1/10]                                                   "]
 right: ["────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM [▴]      LatS    NS    LonD    LonM    LonS    EW    C…    ", "─────┬──────────────────────────────────────────────────────────────────────────", "118  │  44      1             12      N     92      27      35      W     R…    ", "56   │  43      2             59      N     76      9       0       W     S…    ", "49   │  39      2             59      N     95      40      11      W     T…    ", "29   │  46      4             11      N     118     19      48      W     W…    ", "83   │  32      4             48      N     81      5       23      W     S…    ", "─────┴──────────────────────────────────────────────────────────────────────────", "stdin [Row 118/128, Col 1/10]                                                   "]

---- app::tests::test_sorting_with_filter stdout ----
thread 'app::tests::test_sorting_with_filter' panicked at src/app.rs:1889:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM [▴]      LatS    City                                       ", "────┬──────────────────────────────────────────────────┬────────────────────────", "94  │  34      6             36      San Bernardino    │                        ", "90  │  37      20            24      San Jose          │                        ", "88  │  34      25            11      Santa Barbara     │                        ", "95  │  29      25            12      San Antonio       │                        ", "86  │  38      26            23      Santa Rosa        │                        ", "────┴──────────────────────────────────────────────────┴────────────────────────", "stdin [Row 94/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]
 right: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM [▴]      LatS    City                                       ", "────┬──────────────────────────────────────────────────┬────────────────────────", "94  │  34      6             36      San Bernardino    │                        ", "90  │  37      20            24      San Jose          │                        ", "95  │  29      25            12      San Antonio       │                        ", "88  │  34      25            11      Santa Barbara     │                        ", "86  │  38      26            23      Santa Rosa        │                        ", "────┴──────────────────────────────────────────────────┴────────────────────────", "stdin [Row 94/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]


failures:
    app::tests::test_carriage_returns
    app::tests::test_sorting
    app::tests::test_sorting_with_filter

test result: FAILED. 61 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.94s
YS-L commented

Thanks! I could reproduce the failures with app::tests::test_sorting and app::tests::test_sorting_with_filter after upgrading cargo / rustc. Those should be fixed now.

Still need to look into app::tests::test_carriage_returns.

YS-L commented

I updated the tests to sort by a column without ties which was likely the cause of the failures in different platforms. Feel free to reopen if you still still see the issue.

failures:

---- app::tests::test_simple stdout ----
thread 'app::tests::test_simple' panicked at src/app.rs:966:9:
assertion `left == right` failed
  left: ["──────────────────────────────", "      a     b                 ", "───┬──────────────┬───────────", "4  │  A4    B4    │           ", "5  │  A5    B5    │           ", "6  │  A6    B6    │           ", "7  │  A7    B7    │           ", "8  │  A8    B8    │           ", "───┴──────────────┴───────────", "stdin [Row 8/2312+, Col 1/2]  "]
 right: ["──────────────────────────────", "      a     b                 ", "───┬──────────────┬───────────", "4  │  A4    B4    │           ", "5  │  A5    B5    │           ", "6  │  A6    B6    │           ", "7  │  A7    B7    │           ", "8  │  A8    B8    │           ", "───┴──────────────┴───────────", "stdin [Row 8/5000, Col 1/2]   "]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- app::tests::test_sorting stdout ----
thread 'app::tests::test_sorting' panicked at src/app.rs:1827:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "      LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City               State          ", "───┬──────────────────────────────────────────────────────────────────────────────────────────┬─────", "1  │  41      5       59      N     80      39      0       W     Youngstown         OH       │     ", "2  │  42      52      48      N     97      23      23            Yankton            SD       │     ", "3  │  46      35      59      N     120     30      36      W     Yakima             WA       │     ", "4  │  42      16      12      N     71      48      0       W     Worcester          MA       │     ", "5  │  43      37      48      N     89      46      11      W     Wisconsin Dells    WI       │     ", "───┴──────────────────────────────────────────────────────────────────────────────────────────┴─────", "stdin [Row 1/128, Col 1/10] [Sorting by City...]                                                    "]
 right: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City [▴]      State             ", "─────┬─────────────────────────────────────────────────────────────────────────────────────┬────────", "128  │  41      9       35      N     81      14      23      W     Ravenna       OH       │        ", "127  │  40      19      48      N     75      55      48      W     Reading       PA       │        ", "126  │  40      10      48      N     122     14      23      W     Red Bluff     CA       │        ", "125  │  50      25      11      N     104     39      0       W     Regina        SA       │        ", "124  │  39      31      12      N     119     48      35      W     Reno          NV       │        ", "─────┴─────────────────────────────────────────────────────────────────────────────────────┴────────", "stdin [Row 128/128, Col 1/10]                                                                       "]

---- app::tests::test_sorting_with_filter stdout ----
thread 'app::tests::test_sorting_with_filter' panicked at src/app.rs:1895:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City                                             ", "────┬───────────────────────────────────────────┬───────────────────────────────", "86  │  38      26      23      Santa Rosa       │                               ", "87  │  35      40      48      Santa Fe         │                               ", "88  │  34      25      11      Santa Barbara    │                               ", "89  │  33      45      35      Santa Ana        │                               ", "90  │  37      20      24      San Jose         │                               ", "────┴───────────────────────────────────────────┴───────────────────────────────", "stdin [Row 86/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]
 right: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City [▴]                                         ", "────┬────────────────────────────────────────────┬──────────────────────────────", "96  │  31      27      35      San Angelo        │                              ", "95  │  29      25      12      San Antonio       │                              ", "94  │  34      6       36      San Bernardino    │                              ", "93  │  32      42      35      San Diego         │                              ", "91  │  37      46      47      San Francisco     │                              ", "────┴────────────────────────────────────────────┴──────────────────────────────", "stdin [Row 96/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]

It still fails on Arch Linux RISC-V. I have tried to build it from tag v0.10.1 and cherry-pick 002edeb and built it from the head commit 002edeb

It builds succesfully with nix (on x86_64-linux) 002edeb

requesting 0.10.2

@phanirithvij I can't understand why you are talking about nix here.

I find that you neither are the maintainer of csvlens in nixpkgs, nor have ever contributed to it. If you really care about your nix, why don't you just bump csvlens's version in nixpkgs. It is still remaining on 0.10.0, which has been outdated for over a month.

As downstream maintainers, a basic courtesy is, we should be very cautious about making requests upstream about release schedules, as this is usually very rude and disrupts the work of upstream developers. If you are really desperate to use unreleased commits from upstream, you should first consider using commit hashes directly in your downstream and explain why you want to do so, or cherry-pick a set of commits on top of a stable release from upstream.

I can attest that this test works fine on x86_64 on both Nix and Arch Linux as of commit 002edeb, although it has never been broken on these distros accroding to package history.

Let's just focus on the failure platform.


(update:) Also tested the 002edeb on aarch64-linux on NixOS, works fine.

I am building it on more hardware-distro matrix to collect more infomation. Testing on riscv64-nixos is a hug challenge becusue we need to nearly building the world from gcc bootstrap. I'll come back later.

If it was never broken on x86_64-linux why do you think I am here? anyway I want nothing to do with this as of now, let's not this discussion go off-topic any further. (nix-free in your terms)
Also, read up on semver. It's fine to request minor version bumps. And it's fair for the request to be denied. Patch version/minor version exists solely for this reason.
edit: it might've been fixed in 0.10.1 itself, if so this is a misunderstanding so I suggest leaving this as it stands and I'm sorry.

Sorry for late feedback. I have finished testing the commit 002edeb on multi platform-distro matrix, here is the result:

platform distro actual hardware test pass?
x86_64-linux Arch Linux Intel i9 185H
x86_64-linux NixOS AMD Ryzen 7840U
aarch64-linux NixOS Raspberry Pi 5b
riscv64-linux Arch Linux qemu-user on
AMD Ryzen 5990x
✘[1]
riscv64-linux Arch Linux Lichee Pi 4A ✘[2]
riscv64-linux NixOS qemu-user on
Intel Xeon 6266C
✘[3]
riscv64-linux eweOS qemu-user ✘[4]
loongarch64-linux AOSC OS Loongson 3A5000

detail logs:

failures:

---- app::tests::test_sorting stdout ----
thread 'app::tests::test_sorting' panicked at src/app.rs:1837:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "      LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City               State          ", "───┬──────────────────────────────────────────────────────────────────────────────────────────┬─────", "1  │  41      5       59      N     80      39      0       W     Youngstown         OH       │     ", "2  │  42      52      48      N     97      23      23            Yankton            SD       │     ", "3  │  46      35      59      N     120     30      36      W     Yakima             WA       │     ", "4  │  42      16      12      N     71      48      0       W     Worcester          MA       │     ", "5  │  43      37      48      N     89      46      11      W     Wisconsin Dells    WI       │     ", "───┴──────────────────────────────────────────────────────────────────────────────────────────┴─────", "stdin [Row 1/128, Col 1/10] [Sorting by City...]                                                    "]
 right: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City [▴]      State             ", "─────┬─────────────────────────────────────────────────────────────────────────────────────┬────────", "128  │  41      9       35      N     81      14      23      W     Ravenna       OH       │        ", "127  │  40      19      48      N     75      55      48      W     Reading       PA       │        ", "126  │  40      10      48      N     122     14      23      W     Red Bluff     CA       │        ", "125  │  50      25      11      N     104     39      0       W     Regina        SA       │        ", "124  │  39      31      12      N     119     48      35      W     Reno          NV       │        ", "─────┴─────────────────────────────────────────────────────────────────────────────────────┴────────", "stdin [Row 128/128, Col 1/10]                                                                       "]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- app::tests::test_sorting_with_filter stdout ----
thread 'app::tests::test_sorting_with_filter' panicked at src/app.rs:1905:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────", "      LatD    LatM    LatS    City [▴]                                          ", "───┬────────────────────────────────────────┬───────────────────────────────────", "   │                                        │                                   ", "   │                                        │                                   ", "   │                                        │                                   ", "   │                                        │                                   ", "   │                                        │                                   ", "───┴────────────────────────────────────────┴───────────────────────────────────", "stdin [Row -/128, Col 1/4] [Filter \"San\": Finding...] [Filter \"Lat|City\": 4/10 c"]
 right: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City [▴]                                         ", "────┬────────────────────────────────────────────┬──────────────────────────────", "96  │  31      27      35      San Angelo        │                              ", "95  │  29      25      12      San Antonio       │                              ", "94  │  34      6       36      San Bernardino    │                              ", "93  │  32      42      35      San Diego         │                              ", "91  │  37      46      47      San Francisco     │                              ", "────┴────────────────────────────────────────────┴──────────────────────────────", "stdin [Row 96/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]


failures:
    app::tests::test_sorting
    app::tests::test_sorting_with_filter

test result: FAILED. 62 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.34s

error: test failed, to rerun pass `--lib`
---- app::tests::test_sorting stdout ----
thread 'app::tests::test_sorting' panicked at src/app.rs:1837:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "      LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City               State          ", "───┬──────────────────────────────────────────────────────────────────────────────────────────┬─────", "1  │  41      5       59      N     80      39      0       W     Youngstown         OH       │     ", "2  │  42      52      48      N     97      23      23            Yankton            SD       │     ", "3  │  46      35      59      N     120     30      36      W     Yakima             WA       │     ", "4  │  42      16      12      N     71      48      0       W     Worcester          MA       │     ", "5  │  43      37      48      N     89      46      11      W     Wisconsin Dells    WI       │     ", "───┴──────────────────────────────────────────────────────────────────────────────────────────┴─────", "stdin [Row 1/128, Col 1/10] [Sorting by City...]                                                    "]
 right: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City [▴]      State             ", "─────┬─────────────────────────────────────────────────────────────────────────────────────┬────────", "128  │  41      9       35      N     81      14      23      W     Ravenna       OH       │        ", "127  │  40      19      48      N     75      55      48      W     R
eading       PA       │        ", "126  │  40      10      48      N     122     14      23      W     Red Bluff     CA       │        ", "125  │  50      25      11      N     104     39      0       W     Regina        SA       │        ", "124  │  39      31      12      N     119     48      35      W     Reno          NV       │        ", "─────┴─────────────────────────────────────────────────────────────────────────────────────┴────────", "stdin [Row 128/128, Col 1/10]                                                                       "]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- app::tests::test_sorting_with_filter stdout ----
thread 'app::tests::test_sorting_with_filter' panicked at src/app.rs:1905:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City                                             ", "────┬───────────────────────────────────────────┬───────────────────────────────", "86  │  38      26      23      Santa Rosa       │                               ", "87  │  35      40      48      Santa Fe         │                               ", "88  │  34      25      11      Santa Barbara    │                               ", "89  │  33      45      35      Santa Ana        │                               ", "90  │  37      20      24      San Jose         │                               ", "────┴───────────────────────────────────────────┴───────────────────────────────", "stdin [Row 86/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]
 right: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City [▴]                                         ", "────┬────────────────────────────────────────────┬──────────────────────────────", "96  │  31      27      35      San Angelo        │                              ", "95  │  29      25      12      San Antonio       │                              ", "94  │  34      6       36      San Bernardino    │                              ", "93  │  32      42      35      San Diego         │                              ", "91  │  37      46      47      San Francisco     │                              ", "────┴────────────────────────────────────────────┴──────────────────────────────", "stdin [Row 96/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]


failures:
    app::tests::test_sorting
    app::tests::test_sorting_with_filter

test result: FAILED. 62 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.55s

error: test failed, to rerun pass `--lib`
csvlens> failures:
csvlens> ---- app::tests::test_sorting stdout ----
csvlens> thread 'app::tests::test_sorting' panicked at src/app.rs:1837:9:
csvlens> assertion `left == right` failed
csvlens>   left: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "      LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City               State          ", "───┬──────────────────────────────────────────────────────────────────────────────────────────┬─────", "1  │  41      5       59      N     80      39      0       W     Youngstown         OH       │     ", "2  │  42      52      48      N     97      23      23            Yankton            SD       │     ", "3  │  46      35      59      N     120     30      36      W     Yakima             WA       │     ", "4  │  42      16      12      N     71      48      0       W     Worcester          MA       │     ", "5  │  43      37      48      N     89      46      11      W     Wisconsin Dells    WI       │     ", "───┴──────────────────────────────────────────────────────────────────────────────────────────┴─────", "stdin [Row 1/128, Col 1/10] [Sorting by City...]                                                    "]
csvlens>  right: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City [▴]      State             ", "─────┬─────────────────────────────────────────────────────────────────────────────────────┬────────", "128  │  41      9       35      N     81      14      23      W     Ravenna       OH       │        ", "127  │  40      19      48      N     75      55      48      W     Reading       PA       │        ", "126  │  40      10      48      N     122     14      23      W     Red Bluff     CA       │        ", "125  │  50      25      11      N     104     39      0       W     Regina        SA       │        ", "124  │  39      31      12      N     119     48      35      W     Reno          NV       │        ", "─────┴─────────────────────────────────────────────────────────────────────────────────────┴────────", "stdin [Row 128/128, Col 1/10]                                                                       "]
csvlens> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
csvlens> failures:
csvlens>     app::tests::test_sorting
csvlens> test result: FAILED. 63 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.96s
failures:

---- app::tests::test_sorting stdout ----
thread 'app::tests::test_sorting' panicked at src/app.rs:1837:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "      LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City               State          ", "───┬──────────────────────────────────────────────────────────────────────────────────────────┬─────", "1  │  41      5       59      N     80      39      0       W     Youngstown         OH       │     ", "2  │  42      52      48      N     97      23      23            Yankton            SD       │     ", "3  │  46      35      59      N     120     30      36      W     Yakima             WA       │     ", "4  │  42      16      12      N     71      48      0       W     Worcester          MA       │     ", "5  │  43      37      48      N     89      46      11      W     Wisconsin Dells    WI       │     ", "───┴──────────────────────────────────────────────────────────────────────────────────────────┴─────", "stdin [Row 1/128, Col 1/10] [Sorting by City...]                                                    "]
 right: ["────────────────────────────────────────────────────────────────────────────────────────────────────", "        LatD    LatM    LatS    NS    LonD    LonM    LonS    EW    City [▴]      State             ", "─────┬─────────────────────────────────────────────────────────────────────────────────────┬────────", "128  │  41      9       35      N     81      14      23      W     Ravenna       OH       │        ", "127  │  40      19      48      N     75      55      48      W     Reading       PA       │        ", "126  │  40      10      48      N     122     14      23      W     Red Bluff     CA       │        ", "125  │  50      25      11      N     104     39      0       W     Regina        SA       │        ", "124  │  39      31      12      N     119     48      35      W     Reno          NV       │        ", "─────┴─────────────────────────────────────────────────────────────────────────────────────┴────────", "stdin [Row 128/128, Col 1/10]                                                                       "]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- app::tests::test_sorting_with_filter stdout ----
thread 'app::tests::test_sorting_with_filter' panicked at src/app.rs:1905:9:
assertion `left == right` failed
  left: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City                                             ", "────┬───────────────────────────────────────────┬───────────────────────────────", "86  │  38      26      23      Santa Rosa       │                               ", "87  │  35      40      48      Santa Fe         │                               ", "88  │  34      25      11      Santa Barbara    │                               ", "89  │  33      45      35      Santa Ana        │                               ", "90  │  37      20      24      San Jose         │                               ", "────┴───────────────────────────────────────────┴───────────────────────────────", "stdin [Row 86/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]
 right: ["────────────────────────────────────────────────────────────────────────────────", "       LatD    LatM    LatS    City [▴]                                         ", "────┬────────────────────────────────────────────┬──────────────────────────────", "96  │  31      27      35      San Angelo        │                              ", "95  │  29      25      12      San Antonio       │                              ", "94  │  34      6       36      San Bernardino    │                              ", "93  │  32      42      35      San Diego         │                              ", "91  │  37      46      47      San Francisco     │                              ", "────┴────────────────────────────────────────────┴──────────────────────────────", "stdin [Row 96/128, Col 1/4] [Filter \"San\": 1/11] [Filter \"Lat|City\": 4/10 cols] "]


failures:
    app::tests::test_sorting
    app::tests::test_sorting_with_filter

test result: FAILED. 62 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.79s

error: test failed, to rerun pass `--lib`

So sorry that I am lack of darwin and BSD devices.

Finally, I added this line and all tests passing... sed -e 's|thread::sleep(time::Duration::from_millis([0-9]\+))|thread::sleep(time::Duration::from_millis(5000))|g' -i src/app.rs What are the sleeps in tests do?

YS-L commented

@Cryolitia Thanks for the detailed report! Regarding the sleeps in the tests: the app performs certain operations, like sorting and searching, in separate threads. The sleeps are a quick (though somewhat hacky) way to wait for these operations to finish before checking the output. In environments with limited CPU resources, the current sleep duration might not be enough.

Reopening. I’ll try to find a way to make the tests work in those environments without slowing them down unnecessarily.

YS-L commented

@Cryolitia Would you mind checking if #108 fixes the issue?