mirror of https://github.com/status-im/consul.git
test: wait for Serf check in TestServicesWatch (#6867)
Following example from TestNodesWatch * test: WaitForSerfCheck all the places in api/watch_funcs_test.go
This commit is contained in:
parent
66b8c20990
commit
7484b42b93
|
@ -300,6 +300,8 @@ func TestServicesWatch(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wakeups []map[string][]string
|
wakeups []map[string][]string
|
||||||
notifyCh = make(chan struct{})
|
notifyCh = make(chan struct{})
|
||||||
|
@ -447,6 +449,8 @@ func TestServiceWatch(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wakeups [][]*api.ServiceEntry
|
wakeups [][]*api.ServiceEntry
|
||||||
notifyCh = make(chan struct{})
|
notifyCh = make(chan struct{})
|
||||||
|
@ -515,6 +519,8 @@ func TestServiceMultipleTagsWatch(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wakeups [][]*api.ServiceEntry
|
wakeups [][]*api.ServiceEntry
|
||||||
notifyCh = make(chan struct{})
|
notifyCh = make(chan struct{})
|
||||||
|
@ -606,6 +612,8 @@ func TestChecksWatch_State(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wakeups [][]*api.HealthCheck
|
wakeups [][]*api.HealthCheck
|
||||||
notifyCh = make(chan struct{})
|
notifyCh = make(chan struct{})
|
||||||
|
@ -680,6 +688,8 @@ func TestChecksWatch_Service(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wakeups [][]*api.HealthCheck
|
wakeups [][]*api.HealthCheck
|
||||||
notifyCh = make(chan struct{})
|
notifyCh = make(chan struct{})
|
||||||
|
@ -884,6 +894,8 @@ func TestConnectLeafWatch(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
// Register a web service to get certs for
|
// Register a web service to get certs for
|
||||||
{
|
{
|
||||||
agent := c.Agent()
|
agent := c.Agent()
|
||||||
|
@ -966,6 +978,8 @@ func TestAgentServiceWatch(t *testing.T) {
|
||||||
c, s := makeClient(t)
|
c, s := makeClient(t)
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
s.WaitForSerfCheck(t)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wakeups []*api.AgentService
|
wakeups []*api.AgentService
|
||||||
notifyCh = make(chan struct{})
|
notifyCh = make(chan struct{})
|
||||||
|
|
Loading…
Reference in New Issue