Sha256: 522af2616b3789d5284e9bda2926eb9861f03698db4ad4d5460c8d97ae7c2223

Contents?: true

Size: 1.86 KB

Versions: 14

Compression:

Stored size: 1.86 KB

Contents

description: "find"

schemaVersion: "1.0"

createEntities:
  - client:
      id: &client0 client0
      useMultipleMongoses: true # ensure cursors pin to a single server
      observeEvents: [ commandStartedEvent ]
  - database:
      id: &database0 database0
      client: *client0
      databaseName: &database0Name find-tests
  - collection:
      id: &collection0 collection0
      database: *database0
      collectionName: &collection0Name coll0

initialData:
  - collectionName: *collection0Name
    databaseName: *database0Name
    documents:
      - { _id: 1, x: 11 }
      - { _id: 2, x: 22 }
      - { _id: 3, x: 33 }
      - { _id: 4, x: 44 }
      - { _id: 5, x: 55 }
      - { _id: 6, x: 66 }

tests:
  - description: "find with multiple batches works"
    operations:
      - name: find
        arguments:
          filter: { _id: { $gt: 1 } }
          batchSize: 2
        object: *collection0
        expectResult:
          - { _id: 2, x: 22 }
          - { _id: 3, x: 33 }
          - { _id: 4, x: 44 }
          - { _id: 5, x: 55 }
          - { _id: 6, x: 66 }
    expectEvents:
      - client: *client0
        events:
          - commandStartedEvent:
              command:
                find: *collection0Name
                filter: { _id: { $gt: 1 } }
                batchSize: 2
              commandName: find
              databaseName: *database0Name
          - commandStartedEvent:
              command:
                getMore: { $$type: [ int, long ] }
                collection: *collection0Name
                batchSize: 2
              commandName: getMore
              databaseName: *database0Name
          - commandStartedEvent:
              command:
                getMore: { $$type: [ int, long ] }
                collection: *collection0Name
                batchSize: 2
              commandName: getMore
              databaseName: *database0Name

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
mongo-2.21.0 spec/spec_tests/data/crud_unified/find.yml
mongo-2.20.1 spec/spec_tests/data/crud_unified/find.yml
mogno-2.20.0 spec/spec_tests/data/crud_unified/find.yml
mogno-1.0.0 spec/spec_tests/data/crud_unified/find.yml
mongo-2.20.0 spec/spec_tests/data/crud_unified/find.yml
mongo-2.19.3 spec/spec_tests/data/crud_unified/find.yml
mongo-2.18.3 spec/spec_tests/data/crud_unified/find.yml
mongo-2.19.2 spec/spec_tests/data/crud_unified/find.yml
mongo-2.19.1 spec/spec_tests/data/crud_unified/find.yml
mongo-2.19.0 spec/spec_tests/data/crud_unified/find.yml
mongo-2.18.2 spec/spec_tests/data/crud_unified/find.yml
mongo-2.18.1 spec/spec_tests/data/crud_unified/find.yml
mongo-2.18.0 spec/spec_tests/data/crud_unified/find.yml
mongo-2.18.0.beta1 spec/spec_tests/data/crud_unified/find.yml