Make Stop() wait for the processes to exit
This commit is contained in:
parent
0dfe20ef49
commit
8a92d310ba
|
|
@ -41,7 +41,7 @@ func (s *APIServer) Start(etcdURL string) error {
|
||||||
// Stop stops this process gracefully.
|
// Stop stops this process gracefully.
|
||||||
func (s *APIServer) Stop() {
|
func (s *APIServer) Stop() {
|
||||||
if s.session != nil {
|
if s.session != nil {
|
||||||
s.session.Terminate()
|
s.session.Terminate().Wait()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ var _ = Describe("Apiserver", func() {
|
||||||
|
|
||||||
By("Stopping the API Server")
|
By("Stopping the API Server")
|
||||||
apiServer.Stop()
|
apiServer.Stop()
|
||||||
Eventually(apiServer).Should(gexec.Exit(143))
|
Expect(apiServer).To(gexec.Exit(143))
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ func (e *Etcd) Start(etcdURL string, datadir string) error {
|
||||||
// Stop stops this process gracefully.
|
// Stop stops this process gracefully.
|
||||||
func (e *Etcd) Stop() {
|
func (e *Etcd) Stop() {
|
||||||
if e.session != nil {
|
if e.session != nil {
|
||||||
e.session.Terminate()
|
e.session.Terminate().Wait()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ var _ = Describe("Etcd", func() {
|
||||||
|
|
||||||
By("Stopping the Etcd Server")
|
By("Stopping the Etcd Server")
|
||||||
etcd.Stop()
|
etcd.Stop()
|
||||||
Eventually(etcd).Should(gexec.Exit(143))
|
Expect(etcd).To(gexec.Exit(143))
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue