https://linen.dev logo
running integration tests - issues with example st...
# help
a
This is a follow up to this message in #953005742842069013 (reposting for traceability): https://discordapp.com/channels/803236282088161321/953005742842069013/1059239606878478466 Just tried to run integration tests again as follows in the docs using:
Copy code
cargo test --package cargo-shuttle --all-features --test '*' -- --nocapture
recent stacktrace pretty much looks like as the image with the console just spamming "Waiting for
example project here
to start up..." for five minutes or however long and then just ending with some error saying the test took too long. Currently running Windows + WSL Bash. Stuff I've tried: - Restarting WSL/Docker and my laptop (fixes nothing) - Using Repair on Ubuntu (also fixes nothing relevant but this seems to fix issues with VSC causing WSL to go OOM on Windows which is nice... I guess? lol) - Removing the new tests I created (returns errors from second image, no idea why this is happening) At this point I might go dual boot Linux/Windows because this is genuinely maddening
k
Hmm, yes, this is the same error as our CI gets intermittently. I believe the issue is your system is not able to start all the environments (examples) for the tests fast enough. I have the same issue with the e2e tests on my computer, I can't run all of them at once.
Is it correct that WSL is limited to max 8gb memory?
a
Yeah. That and I actually only have 8gb of ram which means with windows taking up a significant chunk, that means WSL won't be even running with 8gb at that point
k
Ah, yeah, this could be the cause then. Building the example crates will use from 600MiB to 1.2GiB each IIRC.
How many cpu cores do you have?
a
I have 6
k
You could try limit test threads and jobs to 3:
And maybe increasing the timeout here:
Also, opening a PR will run the tests in CI. We should probably make some adjustments so contributors can run tests locally though 😅
a
Ah, that makes sense. I'll give it a go and report back
So it looks like stuff should work normally, but it looks like there's an error with a test that I've created. Probably due to the fact that it uses the same example folder as one of the other tests as it generates
signal: 11, SIGSEGV: invalid memory reference
but not really sure how to await for the first test to finish before I start up the other test (the test in particular is for running the example on a local router ip instead of localhost) - gonna try just adding my test addition to another test
k
Does running only your test work?
Also feel free to open a PR, even if you don't feel like it's done yet, this way we can see where you're at.
You can open it as draft too if you feel it's not quite ready.
a
Looks like the test passes when run in isolation, I'll open a PR in a bit