mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #778 from unihorn/88
fix(TestV2Watch): ensure server has started
This commit is contained in:
commit
e31249fa22
@ -90,6 +90,13 @@ func TestV2GetKeyRecursively(t *testing.T) {
|
|||||||
//
|
//
|
||||||
func TestV2WatchKey(t *testing.T) {
|
func TestV2WatchKey(t *testing.T) {
|
||||||
tests.RunServer(func(s *server.Server) {
|
tests.RunServer(func(s *server.Server) {
|
||||||
|
// There exists a little gap between etcd ready to serve and
|
||||||
|
// it actually serves the first request, which means the response
|
||||||
|
// delay could be a little bigger.
|
||||||
|
// This test is time sensitive, so it does one request to ensure
|
||||||
|
// that the server is working.
|
||||||
|
tests.Get(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo/bar"))
|
||||||
|
|
||||||
var watchResp *http.Response
|
var watchResp *http.Response
|
||||||
c := make(chan bool)
|
c := make(chan bool)
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user