-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
WIP: Feat/memory transport #3022
base: master
Are you sure you want to change the base?
Conversation
Friendly reminder to test your transport by adding a case here:
|
Thanks, will add it. Could you possibly take a look at this PR multiformats/go-multiaddr#256 ? Edit: This is the issue I'm currently having while running my tests
|
I have few questions:
|
I think io.Pipe is fine. This transport will only be used for tests, so it's nice to get as much of the work done by the stdlib as we can. |
b14b377
to
e3203f2
Compare
76e141f
to
f511c2d
Compare
I'm trying to get tests to pass they keep failing. For example, |
- Return io.EOF when reading if remote stream is closed - Return network.ErrReset when reading/writing if remote stream is reset - Return io.ErrPipeClosed when reading if remote stream is closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tests are specifically failing because you don't support deadlines and basic_host expects deadline support. https://github.com/libp2p/go-libp2p/blob/master/p2p/host/basic/basic_host.go#L448
@@ -0,0 +1 @@ | |||
package memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write these before transport integration tests.
t.Errorf("expected to be able to dial memory address (%s)", validAddr) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write end to end transport tests here.
Closes #2293