-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use ephemeral port to bind on in tests #381
Conversation
Can one of the admins verify this patch? |
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.
This is a better way than the one in the repo. But it's not the perfect one which I've been expecting.
We should pass 0 as the port number to bind on, in which case the OS would choose an available port for us. Then we could retrieve the actually bound port through other interfaces(fortunately, both proxygen and thrift provide such interfaces).
You could investigate such examples in the UTs of the graph and webservice module.
Excellent. I will study it. |
👍 |
5111b91
to
4c8d3a7
Compare
Fix and rebase, please review, thx. |
src/interface/storage.thrift
Outdated
@@ -148,15 +148,15 @@ struct AddVerticesRequest { | |||
1: common.GraphSpaceID space_id, | |||
// partId => vertices | |||
2: map<common.PartitionID, list<Vertex>>(cpp.template = "std::unordered_map") parts, | |||
// If true, it equals an upsert operation. | |||
// If true, it equals an upset operation. |
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.
upsert means update or insert.
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.
My bad. 👍👍
jenkins go |
Unit testing passed. |
e6be8aa
to
5485485
Compare
Fix conficts and rebase master. |
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.
Well done.
Jenkins go! |
Unit testing passed. |
* Use ephemeral port to bind on in tests * let the system choose an available port * rebase master * address dutor's comments
* Use ephemeral port to bind on in tests * let the system choose an available port * rebase master * address dutor's comments
Use ephemeral port to bind on in tests #260
Sometimes you need a program to bind to a port that can't be hard-coded. Generally this is when you want to run several of them in parallel; if they all bind to port a specified port, only one of them can succeed.
so use system unused ephemeral port
This will close #260