remove two incorrect h2quic tests

fixes #276
This commit is contained in:
Lucas Clemente
2016-08-11 12:35:13 +02:00
parent 9bed06c8e4
commit 3b5f975e37
2 changed files with 3 additions and 41 deletions

View File

@@ -179,7 +179,8 @@ func (s *Server) handleRequest(session streamCreator, headerStream utils.Stream,
return nil return nil
} }
// Close the server immediately, aborting requests and sending CONNECTION_CLOSE frames to connected clients // Close the server immediately, aborting requests and sending CONNECTION_CLOSE frames to connected clients.
// Close in combination with ListenAndServe() (instead of Serve()) may race if it is called before a UDP socket is established.
func (s *Server) Close() error { func (s *Server) Close() error {
s.serverMutex.Lock() s.serverMutex.Lock()
defer s.serverMutex.Unlock() defer s.serverMutex.Unlock()
@@ -192,6 +193,7 @@ func (s *Server) Close() error {
} }
// CloseGracefully shuts down the server gracefully. The server sends a GOAWAY frame first, then waits for either timeout to trigger, or for all running requests to complete. // CloseGracefully shuts down the server gracefully. The server sends a GOAWAY frame first, then waits for either timeout to trigger, or for all running requests to complete.
// CloseGracefully in combination with ListenAndServe() (instead of Serve()) may race if it is called before a UDP socket is established.
func (s *Server) CloseGracefully(timeout time.Duration) error { func (s *Server) CloseGracefully(timeout time.Duration) error {
// TODO: implement // TODO: implement
return nil return nil

View File

@@ -232,26 +232,6 @@ var _ = Describe("H2 server", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
}) })
It("works", func() {
done := make(chan struct{})
go func() {
defer GinkgoRecover()
err := s.ListenAndServe()
Expect(err).NotTo(HaveOccurred())
done <- struct{}{}
}()
Eventually(func() bool {
err := s.Close()
Expect(err).NotTo(HaveOccurred())
select {
case <-done:
return true
default:
return false
}
}).Should(BeTrue())
}, 0.5)
It("may only be called once", func() { It("may only be called once", func() {
cErr := make(chan error) cErr := make(chan error)
for i := 0; i < 2; i++ { for i := 0; i < 2; i++ {
@@ -281,26 +261,6 @@ var _ = Describe("H2 server", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
}) })
It("works", func() {
done := make(chan struct{})
go func() {
defer GinkgoRecover()
err := s.ListenAndServeTLS(certPath+"fullchain.pem", certPath+"privkey.pem")
Expect(err).NotTo(HaveOccurred())
done <- struct{}{}
}()
Eventually(func() bool {
err := s.Close()
Expect(err).NotTo(HaveOccurred())
select {
case <-done:
return true
default:
return false
}
}).Should(BeTrue())
}, 0.5)
It("may only be called once", func() { It("may only be called once", func() {
cErr := make(chan error) cErr := make(chan error)
for i := 0; i < 2; i++ { for i := 0; i < 2; i++ {