       .then (res) ->
         t.equal res.body, 'method is DELETE'
 
-        shutdown()
-      .then ->
+      .finally ->
+        shutdown()
+      .finally ->
         t.end()
 
 test 'error', (t) ->

      .then ->
        got.post envStringBaseUrl + '/echo?a=1&b=2',
          headers:
            'user-agent': 'integration t'
          json: true
          body:
            hello: 'world'
      .then (res) ->
        t.equal res.statusCode, 200
        planedBody =
          method: 'POST'
          url: '/echo?a=1&b=2'
          urlWithoutQuerystring: '/echo'

      .catch got.HTTPError, (err) ->
        t.equal err.statusCode, 404
        t.equal err.response.body, 'Not Found'
      .finally ->
        shutdown()
      .finally ->
        t.end()

test 'echo request data as json', (t) ->
