From 808ccd5e3b1b855f8aa471b57cfad0127d900e60 Mon Sep 17 00:00:00 2001 From: arches Date: Tue, 21 Jun 2016 09:48:55 -0400 Subject: [PATCH] Updated test cases --- tst/EtcdTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tst/EtcdTest.cpp b/tst/EtcdTest.cpp index cb2ecc7..96b0901 100644 --- a/tst/EtcdTest.cpp +++ b/tst/EtcdTest.cpp @@ -222,7 +222,7 @@ TEST_CASE("wait for a value change") CHECK(!res.is_done()); sleep(1); CHECK(!res.is_done()); - + etcd.set("/test/key1", "43").get(); sleep(1); REQUIRE(res.is_done()); @@ -232,7 +232,7 @@ TEST_CASE("wait for a value 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 res = etcd.watch("/test", true); CHECK(!res.is_done()); @@ -251,6 +251,7 @@ TEST_CASE("wait for a directory change") CHECK(!res2.is_done()); etcd.set("/test/key4", "45").wait(); + sleep(1); REQUIRE(res2.is_done()); CHECK("set" == res2.get().action()); 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") { - 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();