Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4416

Spike: investigate and test command construction batchSize and limit

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Testing

      Use Case

      As a node engineer
      I want descriptive unit tests for command construction, and or commented code
      So that I can prevent regression and understand the rules behind batchSize and limit options.


      • How does getMore and find handle limit and batchSize correctly?
      • The driver takes the Math.abs of batchSize, is this preventing silent errors?
      • The find command used negative limits? Isn't that a special case for findOne?

      Acceptance Criteria

      Testing Requirements

      • Improve the unit tests for command construction, find and getMore specifically
      • Potentially reduce the type checking logic for command construction
        • ex. we don't need to see if batchSize is a number in mutliple places, we should check for nullish after it's been type checked.

            Unassigned Unassigned
            neal.beeken@mongodb.com Neal Beeken
            0 Vote for this issue
            2 Start watching this issue