Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Mar 25, 2013
1 parent 6e20551 commit 312e180
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/node_http_client.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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.