Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeouts on Resistor Color exercise #1411

Closed
still-flow opened this issue Dec 7, 2021 · 9 comments
Closed

Timeouts on Resistor Color exercise #1411

still-flow opened this issue Dec 7, 2021 · 9 comments

Comments

@still-flow
Copy link
Contributor

Some people appear to be experiencing sporadic timeouts on tests for this exercise. Their code appears to be fine locally.

Is that a test-runner issue?

@coriolinus
Copy link
Member

Yes, that's a test runner issue. I believe that there's a max duration hard-coded into the test runner; it may be worth exploring whether it's possible to increase that duration for this exercise at least.

@still-flow
Copy link
Contributor Author

I see. It must be related to exercism/rust-test-runner#30 then. But I can't seem to find the timeout feature anywhere in the code -- so is that somewhere deeper in the infrastructure?

@PieterVanZyl-Dev
Copy link

It's likely related to the fact that this specific exercise has external crates.

It's slower than all the other exercises locally and on the test runner.
a quick solution might be to have a cached crate ?

@yukeevrana
Copy link

yukeevrana commented Jan 13, 2022

I still have same problem. I was advised to leave a comment in the issue if there is one. So here I am. Ready to provide information about my solution, if necessary.

UPD:
Tests on the site passed on the fifth attempt.

@rHermes
Copy link

rHermes commented Jan 13, 2022

I had the same issue, worked on the 4th try

@gabeio
Copy link

gabeio commented Jan 25, 2022

The dependencies on this exercise were fairly large (~87MB). Depending on network speed, crates.io speed (I average ~20s) and then a non-cached build+test takes ~9s on a local, which I'm guessing is more powerful than the runner. It probably is just luck of the draw on who's will not timeout, or have to run back to back to try and try to hit a build runner who already downloaded the deps. I had timeouts on multiple ~6 tries before I got it to work.

cargo clean ; time cargo test
    Updating crates.io index
  Downloaded proc-macro2 v1.0.36
  Downloaded syn v1.0.86
  Downloaded unicode-xid v0.2.2
  Downloaded serde v1.0.135
  Downloaded enum-iterator-derive v0.7.0
  Downloaded proc-macro-crate v0.1.5
  Downloaded toml v0.5.8
  Downloaded cfg-if v0.1.10
  Downloaded int-enum-impl v0.4.0
  Downloaded int-enum v0.4.0
  Downloaded enum-iterator v0.7.0
  Downloaded quote v1.0.15
  Downloaded 12 crates (482.1 KB) in 0.44s
   Compiling proc-macro2 v1.0.36
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.86
   Compiling serde v1.0.135
   Compiling cfg-if v0.1.10
   Compiling quote v1.0.15
   Compiling enum-iterator-derive v0.7.0
   Compiling toml v0.5.8
   Compiling enum-iterator v0.7.0
   Compiling proc-macro-crate v0.1.5
   Compiling int-enum-impl v0.4.0
   Compiling int-enum v0.4.0
   Compiling resistor-color v1.0.0 (/Users/gabeio/Exercism/rust/resistor-color)
    Finished test [unoptimized + debuginfo] target(s) in 46.92s
     Running unittests (target/debug/deps/resistor_color-3539630575024fb4)

running 0 tests

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

     Running tests/resistor-color.rs (target/debug/deps/resistor_color-163a2337cede62fa)

running 8 tests
test test_6 ... ok
test test_2 ... ok
test test_11_out_of_range ... ok
test test_8 ... ok
test test_all_colors ... ok
test test_orange ... ok
test test_black ... ok
test test_white ... ok

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

   Doc-tests resistor-color

running 0 tests

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

cargo test  44.71s user 5.45s system 105% cpu 47.417 total

not sure why it claims Downloaded 12 crates (482.1 KB) in 0.44s when I recorded the network traffic at 87MB transferred, whatever it was seemed to be a git repo because it also spent time resolving deltas.

@hrunting
Copy link

hrunting commented Dec 9, 2022

This still appears to be an issue. Any progress on this? I cannot submit results either locally or through the web editor. On my local machine, it takes less than 10 seconds.

@lucasshuan
Copy link

Having the same issue with this one.
It does in fact work sometime, out of sheer luck I believe. The timeout duration might be really close to the average duration of the test.
Just curious, isn't there a way to simply manually increase the timeout to this exercise?

@senekor
Copy link
Contributor

senekor commented Jul 21, 2023

The test runner was deactivated for this exact reason. Currently, the learning mode (including this concept exercise) is disabled anyway.

Related: Solving exercism/rust-test-runner#35 could improve build times of exercise solutions with external crates significantly.

@senekor senekor closed this as completed Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants