aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-29 10:47:00 -0800
committerGravatar GitHub <noreply@github.com>2016-11-29 10:47:00 -0800
commiteadbe86cb909728b38b9bf91c1e15a44790f958d (patch)
tree05b22d44ece551fc607ca3d30af590e9876438d9 /test/cpp
parent0d8c9cf1d54e8983e99bf2c1276e85b799f5fda2 (diff)
parentd04c822b5835f34fb7153e5c86599bf1e3ba0f45 (diff)
Merge pull request #8890 from ctiller/fixit12
Unique-ify uds address between concurrent bm_fullstack runs
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/cpp/microbenchmarks/bm_fullstack.cc b/test/cpp/microbenchmarks/bm_fullstack.cc
index 559e66cdd7..696b453fa3 100644
--- a/test/cpp/microbenchmarks/bm_fullstack.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack.cc
@@ -128,7 +128,16 @@ class TCP : public FullstackFixture {
class UDS : public FullstackFixture {
public:
- UDS(Service* service) : FullstackFixture(service, "unix:bm_fullstack") {}
+ UDS(Service* service) : FullstackFixture(service, MakeAddress()) {}
+
+ private:
+ static grpc::string MakeAddress() {
+ int port = grpc_pick_unused_port_or_die(); // just for a unique id - not a
+ // real port
+ std::stringstream addr;
+ addr << "unix:/tmp/bm_fullstack." << port;
+ return addr.str();
+ }
};
class EndpointPairFixture {