Browse files

Fix failing test

  • Loading branch information...
1 parent 6e20551 commit 312e180b3b65e86a6cab4bda2b583c575c12e69d @lsegal lsegal committed Mar 25, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/node_http_client.spec.coffee
View
7 test/node_http_client.spec.coffee
@@ -42,9 +42,10 @@ describe 'AWS.NodeHttpClient', ->
error = null
req = new AWS.HttpRequest 'http://1.1.1.1'
runs ->
- http.handleRequest req, {timeout: 12}, null, (err) ->
+ http.handleRequest req, {timeout: 1}, null, (err) ->
error = err
- waitsFor -> error
+
+ waitsFor((-> error), 'Timed out', 100)
runs ->
expect(error.code).toEqual 'TimeoutError'
- expect(error.message).toEqual 'Connection timed out after 12ms'
+ expect(error.message).toEqual 'Connection timed out after 1ms'

0 comments on commit 312e180

Please sign in to comment.