Comments (4)
if i build binary it works fine.
but core dumps when unit test in gtest.
from etcd-cpp-apiv3.
Thanks for reporting. Do you work on the master branch?
from etcd-cpp-apiv3.
I have no information about #include "util/election.h"
, but I have manged to make it compilable:
#include <etcd/Client.hpp>
#include <etcd/KeepAlive.hpp>
#include <memory>
#include <thread>
#include "gtest/gtest.h"
TEST(ELECTION, ELECTION1) {
try{
etcd::Client etcd("http://127.0.0.1:2379");
auto lease_resp = etcd.leasegrant(3).get();
auto _lease_id = lease_resp.value().lease();
auto _keep_alive = std::unique_ptr<etcd::KeepAlive>(new etcd::KeepAlive(etcd, 3, _lease_id));
etcd.set("ass", "ccc", _lease_id).get();
} catch ( std::exception& ex ) {
std::cout << ex.what() << std::endl;
} catch(...){
}
}
And build with the following command:
g++ test.cpp -std=c++14 -letcd-cpp-api -lgtest -lgtest_main
I cannot reproduce the failure on both Ubuntu 20.04 and MacOS, with the current master version. Could you please try to upgrade the latest version?
from etcd-cpp-apiv3.
Close as lack of response and cannot be reproduced.
from etcd-cpp-apiv3.
Related Issues (20)
- tcache error when link etcd-cpp-apiv3 to ceph (with tcmalloc) HOT 11
- [Discussion] Contribute/Transfer the library etcd-cpp-apiv3 to the etcd-io Github organization HOT 1
- how to use etcd::KeepAlive? HOT 4
- keepalive 如何定时的续租 HOT 9
- There will has exceptions when etcd client disconnect with password. HOT 6
- keepalive failed when restart one of three etcd servers HOT 4
- etcd-cpp-api3 not support ipv6 HOT 2
- Is SyncClient thread-safe? HOT 1
- [warn] watcher does't exit normally
- Handle exception
- keepalive thread might exit unexpected when system clock drift HOT 1
- using etcdcpp in project with exception disabled HOT 1
- a lack of functionality in the implementation of the election API HOT 2
- etcd::Client init error with address mem is empty HOT 3
- Sync api 编译问题 HOT 3
- Behavior mismatch on add operation HOT 1
- Build fail with bazel HOT 2
- Waiting for lock not to return HOT 3
- Compilation error on Ubuntu HOT 1
- BUILD_WITH_NO_EXCEPTIONS is invalid HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etcd-cpp-apiv3.