Updated test cases
This commit is contained in:
parent
63661d3889
commit
808ccd5e3b
|
|
@ -232,7 +232,7 @@ TEST_CASE("wait for a value change")
|
||||||
|
|
||||||
TEST_CASE("wait for a directory change")
|
TEST_CASE("wait for a directory change")
|
||||||
{
|
{
|
||||||
etcd::Client etcd("http://127.0.0.1:4001");
|
etcd::Client etcd("http://127.0.0.1:2379");
|
||||||
|
|
||||||
pplx::task<etcd::Response> res = etcd.watch("/test", true);
|
pplx::task<etcd::Response> res = etcd.watch("/test", true);
|
||||||
CHECK(!res.is_done());
|
CHECK(!res.is_done());
|
||||||
|
|
@ -251,6 +251,7 @@ TEST_CASE("wait for a directory change")
|
||||||
CHECK(!res2.is_done());
|
CHECK(!res2.is_done());
|
||||||
|
|
||||||
etcd.set("/test/key4", "45").wait();
|
etcd.set("/test/key4", "45").wait();
|
||||||
|
sleep(1);
|
||||||
REQUIRE(res2.is_done());
|
REQUIRE(res2.is_done());
|
||||||
CHECK("set" == res2.get().action());
|
CHECK("set" == res2.get().action());
|
||||||
CHECK("45" == res2.get().value().as_string());
|
CHECK("45" == res2.get().value().as_string());
|
||||||
|
|
@ -258,7 +259,7 @@ TEST_CASE("wait for a directory change")
|
||||||
|
|
||||||
TEST_CASE("watch changes in the past")
|
TEST_CASE("watch changes in the past")
|
||||||
{
|
{
|
||||||
etcd::Client etcd("http://127.0.0.1:4001");
|
etcd::Client etcd("http://127.0.0.1:2379");
|
||||||
|
|
||||||
int index = etcd.set("/test/key1", "42").get().index();
|
int index = etcd.set("/test/key1", "42").get().index();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue