File: snapshot-sessions-not-supported-server-error.yml

package info (click to toggle)
golang-mongodb-mongo-driver 1.8.4%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 18,520 kB
  • sloc: perl: 533; ansic: 491; python: 432; makefile: 187; sh: 72
file content (102 lines) | stat: -rw-r--r-- 2,347 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
description: snapshot-sessions-not-supported-server-error

schemaVersion: "1.0"

runOnRequirements:
  - minServerVersion: "5.0"
    topologies: [ single ]

createEntities:
  - client:
      id: &client0 client0
      observeEvents: [ commandStartedEvent, commandFailedEvent ]
  - database:
      id: &database0Name database0
      client: *client0
      databaseName: *database0Name
  - collection:
      id: &collection0Name collection0
      database: *database0Name
      collectionName: *collection0Name
  - session:
      id: session0
      client: client0
      sessionOptions:
        snapshot: true

initialData:
  - collectionName: *collection0Name
    databaseName: *database0Name
    documents:
      - { _id: 1, x: 11 }

tests:
- description: Server returns an error on find with snapshot
  operations:
  - name: find
    object: collection0
    arguments:
      session: session0
      filter: {}
    expectError:
      isError: true
      isClientError: false
  expectEvents:
  - client: client0
    events:
    - commandStartedEvent:
        command:
          find: collection0
          readConcern:
            level: snapshot
            atClusterTime:
              "$$exists": false
    - commandFailedEvent:
        commandName: find

- description: Server returns an error on aggregate with snapshot
  operations:
  - name: aggregate
    object: collection0
    arguments:
      session: session0
      pipeline: []
    expectError:
      isError: true
      isClientError: false
  expectEvents:
  - client: client0
    events:
    - commandStartedEvent:
        command:
          aggregate: collection0
          readConcern:
            level: snapshot
            atClusterTime:
              "$$exists": false
    - commandFailedEvent:
        commandName: aggregate

- description: Server returns an error on distinct with snapshot
  operations:
  - name: distinct
    object: collection0
    arguments:
      fieldName: x
      filter: {}
      session: session0
    expectError:
      isError: true
      isClientError: false
  expectEvents:
  - client: client0
    events:
    - commandStartedEvent:
        command:
          distinct: collection0
          readConcern:
            level: snapshot
            atClusterTime:
              "$$exists": false
    - commandFailedEvent:
        commandName: distinct