Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Speeding up tests #593

Closed
victorb opened this issue Sep 5, 2017 · 4 comments · Fixed by #942
Closed

Speeding up tests #593

victorb opened this issue Sep 5, 2017 · 4 comments · Fixed by #942

Comments

@victorb
Copy link
Contributor

victorb commented Sep 5, 2017

Note: Let's not spend too much effort on speeding up the tests. I just want to reach a baseline of performance where the tests are not timing out anymore (currently, tests time out for me on Ubuntu with a 3.30GHz processor)

Currently, we're doing some inefficient things in the tests that we can quickly fix to make the tests run a lot faster. Some suggestions from @dignifiedquire in IRC:

  • run go-ipfs in offline mode so it doesn't connect to the outside world
  • stop respawning the go-ipfs node on every test file. This has the downside of removing clearing the state of the daemon on every test file, but maybe we can do this another way?
  • run tests concurrently. Would speed up the general suite of tests but might make individual tests slower as many things are executed at the same time.
@daviddias
Copy link
Contributor

run go-ipfs in offline mode so it doesn't connect to the outside world

go-ipfs is "offline" for what is worth, MDNS and Bootstrapping is off.

stop respawning the go-ipfs node on every test file. This has the downside of removing clearing the state of the daemon on every test file, but maybe we can do this another way?

We've been there. We moved to have tests self contained

@Kubuxu
Copy link

Kubuxu commented Feb 10, 2019

This is quite important as we would love to run these tests on go-ipfs.
Re: go-ipfs init/startup: use ipfs init -p test which makes go-ipfs startup quite a bit faster.

I would say that if these tests were able to run on go-ipfs in less than 5 min it would be feasible to run them on every build but in the current state, I don't see how useful they would be due to a very slow build.

@alanshaw
Copy link
Contributor

@Kubuxu that's useful to know!

Reduces external interference of IPFS daemon, this is useful when using the daemon in test environments.
https://docs.ipfs.io/reference/api/cli/#ipfs-init

Do you know where I can find more info on what this profile does?

@alanshaw alanshaw mentioned this issue Feb 11, 2019
1 task
@Kubuxu
Copy link

Kubuxu commented Feb 12, 2019

And also here, IDK how I missed this notification: https://github.com/ipfs/go-ipfs-config/blob/master/profile.go#L68-L85

@ghost ghost removed the ready label Feb 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants