rust icon indicating copy to clipboard operation
rust copied to clipboard

Xorcism tests still not running for me

Open bucatini-coder opened this issue 3 years ago • 6 comments

after several attempts, I got past the build dependency errors such as mentioned in #1501 and fixed in #1503, but I am now getting timeouts when the tests run. Although this might be my solution, it runs ok and very quickly on my laptop, so I'm guessing not? Is this a further dependency/build issue?

Your tests timed out. This might mean that there was an issue in our infrastructure, but more likely it suggests that your code is running slowly. Is there an infinite loop or something similar?

Please check your code, and if nothing seems to be wrong, try running the tests again.

locally running the tests:

test result: ok. 109 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

I've manually changed Cargo.toml to:

[dev-dependencies]
hexlit = "0.5"
rstest = "0.12"
rstest_reuse = "0.3"

(note #1503 has test_reuse="0.1.0" but that caused dependency complaints for me) at the time of writing, I cannot see any passing solutions for this exercise in the Community Solutions.

bucatini-coder avatar Jun 10 '22 21:06 bucatini-coder

I was having missing rstest dependency issues (#1501, #1422) and fixed them by updating my Cargo.toml like above and now I get testing timeout, also.

Does this exercise work for people who download it for the first time today? If so, is there a way to RESET this exercise?

jwaddle avatar Jun 13 '22 02:06 jwaddle

I was able to get the testing timeout even with uploading my Cargo.lock which was possible after pinning some versions in Cargo.toml:

[dev-dependencies] hexlit = "0.5" quote = "=1.0.18" proc-macro2 = "=1.0.38" rstest = "0.12" rstest_reuse = "0.3.0" syn = "=1.0.93" unicode-xid = "=0.2.3"

locally, "$ time cargo test" shows 0.358s real time

jwaddle avatar Jun 13 '22 03:06 jwaddle

I initially got test failures due to dependency versions, and then after changing them as shown in this post, timeout. Is there a maintainer that can comment what's going on?

asarkar avatar Jul 06 '22 03:07 asarkar

Same here. I even tried to copy and paste an old passing solution (gormain's) and it does not work.

ddrm86 avatar Aug 10 '22 08:08 ddrm86

Experience the same issue while uploading the solution. Locally, all tests have passed. However, on the platform, I see the time out.

Tried to update libraries for test in this PR: #1540

I hope it will help

vadim2404 avatar Aug 18 '22 13:08 vadim2404

I have the same problem of tests timing out. My program is definitely not slow or memory-bound:

$ /usr/bin/time -f 'Max memory: %M KB' -- ./target/release/xorcism "xor me like there's no tomorrow" </dev/zero | pv>/dev/null
10,4GiB 0:00:16 [ 671MiB/s] [            <=>              ]
^C
Command terminated by signal 2
Max memory: 1920 KB

It also does not have a single while or loop, so it's unlikely to hang indefinitely. If it is the case, I'd appreciate at least a hint about what can subtly go wrong.

EarlGray avatar Sep 01 '22 19:09 EarlGray

rstest uses procedural macros which can hit compile times hard. Two options I see:

  • Remove dependency on rstest
  • Disable the online tests with a note in the exercise description, telling people to rely on local testing instead.

senekor avatar Nov 14 '22 16:11 senekor

I have kind of stopped using exercism when I hit this bug after getting this locally on a not too posh laptop:

real	0m0,203s
user	0m0,148s
sys	0m0,056s

Tried to send 8 different iterations with or without Cargo.lock about 2 months ago.

@wigy-opensource-developer

I'm guessing this is with syn & quote already compiled. I wonder what the output of cargo clean && time cargo test is for you. It was about 7.5 seconds for me, on a decent laptop. I find the exercism test runner to be extremely fast in almost all other cases.

senekor avatar Nov 14 '22 21:11 senekor

should be fixed with https://github.com/exercism/rust/pull/1590

senekor avatar Sep 10 '23 21:09 senekor