-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix SetAllowedOrigins #2021
Fix SetAllowedOrigins #2021
Conversation
2433100
to
b6a5531
Compare
I tested this by simulating the race condition when the ro gateway overtakes the api:
|
@rht can we do that in less than 10s? make a sharness test? |
thanks for picking this up @rht |
The launch order change & time delay to ensure the order are hardcoded. It is not sensible to expose this to cli if the reason is only for sharness testing. To reproduce the race test, move https://github.com/ipfs/go-ipfs/blob/c8e48456308cc68556f0804e8ecff9ef4ea21e32/cmd/ipfs/daemon.go#L253-L257 to after https://github.com/ipfs/go-ipfs/blob/c8e48456308cc68556f0804e8ecff9ef4ea21e32/cmd/ipfs/daemon.go#L268, and put |
@rht could a test case run it a few times to attempt to trigger a race condition? or could do a golang test with a mock-- i want to make sure this does not become a problem in the future. we have many less tests than i would like as it is. |
7d88d5a
to
f98f7b1
Compare
couldnt we test for this by just building the binary we use for sharness tests with |
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
dba2816
to
b67e220
Compare
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
Just fixed this test. To explain how the test checks for race condition, currently, if the api (5001) starts before the gateway (8080), the curl command that works has to be |
this makes sense, thanks |
Hi, Agentenversion go-ipfs/0.4.10/ Am I wrong in thinking that this should be actually already default in 0.4.10? Is this maybe a regression? I see it should be there, but why do I have this issue still git tag --contains b970681 |
Fix #1966