Giter VIP home page Giter VIP logo

Comments (4)

shykoe avatar shykoe commented on July 25, 2024

if i build binary it works fine.
but core dumps when unit test in gtest.

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

Thanks for reporting. Do you work on the master branch?

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

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.

sighingnow avatar sighingnow commented on July 25, 2024

Close as lack of response and cannot be reproduced.

from etcd-cpp-apiv3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.