Increase timeout on user onboarding email endpoint GitOrigin-RevId: d7c9aaae407e31ae2e9cfea5a6dce853c2737ab9
@@ -7,6 +7,8 @@ const _ = require('underscore')
module.exports = {
sendRecentSignupOnboardingEmails(req, res, next) {
+ res.setTimeout(600 * 1000) // increase timeout to handle days with a lot of signups
+
// find all the users with no onboardingEmailSentAt and
// have signed up in the last 7 days
db.users.find(
@@ -47,7 +47,9 @@ describe('UserOnboardingController', function() {
}
})
this.req = {}
- this.res = {}
+ this.res = {
+ setTimeout: sinon.stub()
+ }
it('sends onboarding emails', function(done) {