diff --git a/e2e/apns_e2e_test.go b/e2e/apns_e2e_test.go index 565bb7f..8602192 100644 --- a/e2e/apns_e2e_test.go +++ b/e2e/apns_e2e_test.go @@ -78,7 +78,7 @@ func (s *ApnsE2ETestSuite) setupApnsPusher() ( func (s *ApnsE2ETestSuite) TestSimpleNotification() { p, mockApnsClient, statsdClientMock, responsesChannel := s.setupApnsPusher() go p.Start(context.Background()) - time.Sleep(wait * 2) + time.Sleep(wait) producer, err := kafka.NewProducer(&kafka.ConfigMap{ "bootstrap.servers": s.config.Queue.Brokers, @@ -148,7 +148,7 @@ func (s *ApnsE2ETestSuite) TestSimpleNotification() { func (s *ApnsE2ETestSuite) TestNotificationRetry() { p, mockApnsClient, statsdClientMock, responsesChannel := s.setupApnsPusher() go p.Start(context.Background()) - time.Sleep(wait * 2) + time.Sleep(wait) producer, err := kafka.NewProducer(&kafka.ConfigMap{ "bootstrap.servers": s.config.Queue.Brokers, @@ -238,7 +238,7 @@ func (s *ApnsE2ETestSuite) TestNotificationRetry() { func (s *ApnsE2ETestSuite) TestRetryLimit() { p, mockApnsClient, statsdClientMock, responsesChannel := s.setupApnsPusher() go p.Start(context.Background()) - time.Sleep(wait * 2) + time.Sleep(wait) producer, err := kafka.NewProducer(&kafka.ConfigMap{ "bootstrap.servers": s.config.Queue.Brokers, @@ -311,7 +311,7 @@ func (s *ApnsE2ETestSuite) TestRetryLimit() { func (s *ApnsE2ETestSuite) TestMultipleNotifications() { p, mockApnsClient, statsdClientMock, responsesChannel := s.setupApnsPusher() go p.Start(context.Background()) - time.Sleep(wait * 2) + time.Sleep(wait) notificationsToSend := 10 producer, err := kafka.NewProducer(&kafka.ConfigMap{ @@ -394,7 +394,7 @@ func (s *ApnsE2ETestSuite) TestConsumeMessagesBeforeExiting() { ctx := context.Background() ctx, cancel := context.WithCancel(ctx) go p.Start(ctx) - time.Sleep(wait * 2) + time.Sleep(wait) notificationsToSend := 3 producer, err := kafka.NewProducer(&kafka.ConfigMap{ @@ -485,7 +485,7 @@ func (s *ApnsE2ETestSuite) TestConsumeMessagesBeforeExitingWithRetries() { ctx := context.Background() ctx, cancel := context.WithCancel(ctx) go p.Start(ctx) - time.Sleep(wait * 2) + time.Sleep(wait) producer, err := kafka.NewProducer(&kafka.ConfigMap{ "bootstrap.servers": s.config.Queue.Brokers, diff --git a/e2e/utils_test.go b/e2e/utils_test.go index 4112c2d..1ae8a24 100644 --- a/e2e/utils_test.go +++ b/e2e/utils_test.go @@ -3,7 +3,7 @@ package e2e import "time" const ( - wait = 15 * time.Second + wait = 5 * time.Second timeout = 1 * time.Minute apnsTopicTemplate = "push-%s_apns-single" gcmTopicTemplate = "push-%s_gcm-single"