     connection.execSql("select top #{numberOfRows} object_id, name from sys.all_columns", (err, rowCount) ->
       test.ok(!err)
       test.strictEqual(rowCount, numberOfRows)
+      test.strictEqual(rowsReceived, numberOfRows)
       test.done()
     )
   )

  )
  
  connection.on('row', (columns) ->
    test.strictEqual(columns.length, 2)
  )

  connection.on('debug', (message) ->


exports.execSqlWithLotsOfRowsReturned = (test) ->
  numberOfRows = 1000
  rowsReceived = 0

  test.expect(6)

  connection = new Connection(config.server, config.userName, config.password, config.options, (err, loggedIn) ->
    test.ok(!err)
