Make crash-reporter spec more reliable
authorCheng Zhao <zcbenz@gmail.com>
Tue, 15 Sep 2015 05:18:01 +0000 (13:18 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 15 Sep 2015 05:18:01 +0000 (13:18 +0800)
spec/api-crash-reporter-spec.coffee

index 6cd7142..1d34fe4 100644 (file)
@@ -19,8 +19,9 @@ describe 'crash-reporter module', ->
   return if process.platform is 'win32' and process.arch is 'x64'
 
   it 'should send minidump when renderer crashes', (done) ->
-    @timeout 60000
+    @timeout 120000
     server = http.createServer (req, res) ->
+      server.close()
       form = new formidable.IncomingForm()
       process.throwDeprecation = false
       form.parse req, (error, fields, files) ->
@@ -37,7 +38,6 @@ describe 'crash-reporter module', ->
         assert files['upload_file_minidump']['name']?
 
         res.end('abc-123-def')
-        server.close()
         done()
     # Server port is generated randomly for the first run, it will be reused
     # when page is refreshed.