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

Fixed and cleaned up TestIpfsStressRead #5920

Merged
merged 3 commits into from
Jan 21, 2019
Merged

Conversation

hexdigest
Copy link
Contributor

No description provided.

License: MIT
Signed-off-by: Max Chechel <hexdigest@gmail.com>
@Stebalien
Copy link
Member

What's this trying to fix?

License: MIT
Signed-off-by: Max Chechel <mc@gojuno.com>
@hexdigest
Copy link
Contributor Author

hexdigest commented Jan 10, 2019

@Stebalien this stress test fails because it tries to read files using paths like this:
/tmp/fusetest413711254/ipfs/QmNst9wkM4mJNAFMzbLqUjPF2adxAcGACZYK2UxHgg6Tr7/child2/child0

while actual file path on a mounted filesystem doesn't have "/ipfs/" in it

Beside that if you run this test with -race flag enabled, you'll get "race: limit on 8192 simultaneously alive goroutines is exceeded, dying" error. This happens because nd.Context() is never being closed during the test and all go run() methods in session/sessionmanager/etc never exit which leads to goroutine leak (I'm going to fix it later)

This fix also adds more verbosity to test failure messages because when you send error to the channel you loose information about the line where this error occured and there are 6 lines where this can happen.

@Stebalien
Copy link
Member

Ah, got it.

The first two fixes sound good but t.Run/t.Parallel probably aren't the right tools here. They're designed for running tests in parallel to speed them up. However, we're trying to run these tests in parallel to stress-test. That is, we want them to run in parallel with each other but nothing else.

(note: as-is, the t.Parallel call need to be moved into the t.Run for it to work correctly, but that would cause the test to exit before the subtests tests finish running).

@Stebalien Stebalien added status/in-progress In progress need/author-input Needs input from the original author labels Jan 11, 2019
License: MIT
Signed-off-by: Max Chechel <hexdigest@gmail.com>
@hexdigest
Copy link
Contributor Author

@Stebalien
I put back initial implementation with goroutine. Some tests are failing but It doesn't seem like it's related to the changes I made.

@Stebalien Stebalien removed the need/author-input Needs input from the original author label Jan 21, 2019
@Stebalien Stebalien merged commit 083d85c into ipfs:master Jan 21, 2019
@ghost ghost removed the status/in-progress In progress label Jan 21, 2019
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

Successfully merging this pull request may close these issues.

2 participants