Skip to content

Commit

Permalink
Add more time to the FasthttpServiceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jamillosantos committed Oct 8, 2018
1 parent fd44c8f commit 11fe5e8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fasthttp_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ var _ = g.Describe("Services", func() {
wg.Done()
}()
wg.Wait()
time.Sleep(time.Millisecond * 50)
time.Sleep(time.Millisecond * 500)
wg.Add(1)
Expect(service.Stop()).To(BeNil())
wg.Wait()
done <- true
}, 0.5)
}, 1)

g.It("should restart the service that is not started", func(done g.Done) {
var service FasthttpService
Expand All @@ -73,12 +73,12 @@ var _ = g.Describe("Services", func() {
wg.Done()
}()
wg.Wait()
time.Sleep(time.Millisecond * 50)
time.Sleep(time.Millisecond * 500)
wg.Add(1)
Expect(service.Stop()).To(BeNil())
wg.Wait()
done <- true
}, 0.5)
}, 1)

g.It("should stop a stopped service", func() {
var service FasthttpService
Expand All @@ -98,11 +98,12 @@ var _ = g.Describe("Services", func() {
ch <- "service:step1:end"
}()

time.Sleep(time.Millisecond * 50) // Waits for the service a bit
time.Sleep(time.Millisecond*50) // Waits for the service a bit

go func() {
ch <- "service:step2:begin"
service.Restart()
time.Sleep(time.Millisecond*50)
ch <- "service:step2:end"
}()

Expand Down

0 comments on commit 11fe5e8

Please sign in to comment.