%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/optisoftcom/.cpanm/work/1544535425.21555/MongoDB-v2.0.2/t/data/transactions/
Upload File :
Create Path :
Current File : /home/opti/optisoftcom/.cpanm/work/1544535425.21555/MongoDB-v2.0.2/t/data/transactions/reads.json

{
  "database_name": "transaction-tests",
  "collection_name": "test",
  "data": [
    {
      "_id": 1
    },
    {
      "_id": 2
    },
    {
      "_id": 3
    },
    {
      "_id": 4
    }
  ],
  "tests": [
    {
      "description": "collection readConcern without transaction",
      "operations": [
        {
          "name": "find",
          "object": "collection",
          "collectionOptions": {
            "readConcern": {
              "level": "majority"
            }
          },
          "arguments": {
            "session": "session0"
          },
          "result": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "find": "test",
              "readConcern": {
                "level": "majority"
              },
              "lsid": "session0",
              "txnNumber": null,
              "startTransaction": null,
              "autocommit": null
            },
            "command_name": "find",
            "database_name": "transaction-tests"
          }
        }
      ],
      "outcome": {
        "collection": {
          "data": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        }
      }
    },
    {
      "description": "count",
      "operations": [
        {
          "name": "startTransaction",
          "object": "session0"
        },
        {
          "name": "count",
          "object": "collection",
          "arguments": {
            "session": "session0",
            "filter": {
              "_id": 1
            }
          },
          "result": {
            "errorContains": "Cannot run 'count' in a multi-document transaction",
            "errorLabelsOmit": [
              "TransientTransactionError",
              "UnknownTransactionCommitResult"
            ]
          }
        },
        {
          "name": "abortTransaction",
          "object": "session0"
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "count": "test",
              "query": {
                "_id": 1
              },
              "readConcern": null,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": true,
              "autocommit": false,
              "writeConcern": null
            },
            "command_name": "count",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "abortTransaction": 1,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false,
              "writeConcern": null
            },
            "command_name": "abortTransaction",
            "database_name": "admin"
          }
        }
      ],
      "outcome": {
        "collection": {
          "data": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        }
      }
    },
    {
      "description": "find",
      "operations": [
        {
          "name": "startTransaction",
          "object": "session0"
        },
        {
          "name": "find",
          "object": "collection",
          "arguments": {
            "session": "session0",
            "batchSize": 3
          },
          "result": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        },
        {
          "name": "find",
          "object": "collection",
          "arguments": {
            "session": "session0",
            "batchSize": 3
          },
          "result": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        },
        {
          "name": "commitTransaction",
          "object": "session0"
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "find": "test",
              "batchSize": 3,
              "readConcern": null,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": true,
              "autocommit": false
            },
            "command_name": "find",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "getMore": {
                "$numberLong": "42"
              },
              "collection": "test",
              "batchSize": 3,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false
            },
            "command_name": "getMore",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "find": "test",
              "batchSize": 3,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false
            },
            "command_name": "find",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "getMore": {
                "$numberLong": "42"
              },
              "collection": "test",
              "batchSize": 3,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false
            },
            "command_name": "getMore",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "commitTransaction": 1,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false,
              "writeConcern": null
            },
            "command_name": "commitTransaction",
            "database_name": "admin"
          }
        }
      ],
      "outcome": {
        "collection": {
          "data": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        }
      }
    },
    {
      "description": "aggregate",
      "operations": [
        {
          "name": "startTransaction",
          "object": "session0"
        },
        {
          "name": "aggregate",
          "object": "collection",
          "arguments": {
            "pipeline": [
              {
                "$project": {
                  "_id": 1
                }
              }
            ],
            "batchSize": 3,
            "session": "session0"
          },
          "result": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        },
        {
          "name": "aggregate",
          "object": "collection",
          "arguments": {
            "pipeline": [
              {
                "$project": {
                  "_id": 1
                }
              }
            ],
            "batchSize": 3,
            "session": "session0"
          },
          "result": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        },
        {
          "name": "commitTransaction",
          "object": "session0"
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "aggregate": "test",
              "pipeline": [
                {
                  "$project": {
                    "_id": 1
                  }
                }
              ],
              "cursor": {
                "batchSize": 3
              },
              "readConcern": null,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": true,
              "autocommit": false
            },
            "command_name": "aggregate",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "getMore": {
                "$numberLong": "42"
              },
              "collection": "test",
              "batchSize": 3,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false
            },
            "command_name": "getMore",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "aggregate": "test",
              "pipeline": [
                {
                  "$project": {
                    "_id": 1
                  }
                }
              ],
              "cursor": {
                "batchSize": 3
              },
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false
            },
            "command_name": "aggregate",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "getMore": {
                "$numberLong": "42"
              },
              "collection": "test",
              "batchSize": 3,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false
            },
            "command_name": "getMore",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "commitTransaction": 1,
              "lsid": "session0",
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false,
              "writeConcern": null
            },
            "command_name": "commitTransaction",
            "database_name": "admin"
          }
        }
      ],
      "outcome": {
        "collection": {
          "data": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        }
      }
    },
    {
      "description": "distinct",
      "operations": [
        {
          "name": "startTransaction",
          "object": "session0"
        },
        {
          "name": "distinct",
          "object": "collection",
          "arguments": {
            "session": "session0",
            "fieldName": "_id"
          },
          "result": [
            1,
            2,
            3,
            4
          ]
        },
        {
          "name": "commitTransaction",
          "object": "session0"
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "distinct": "test",
              "key": "_id",
              "lsid": "session0",
              "readConcern": null,
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": true,
              "autocommit": false,
              "writeConcern": null
            },
            "command_name": "distinct",
            "database_name": "transaction-tests"
          }
        },
        {
          "command_started_event": {
            "command": {
              "commitTransaction": 1,
              "lsid": "session0",
              "readConcern": null,
              "txnNumber": {
                "$numberLong": "1"
              },
              "startTransaction": null,
              "autocommit": false,
              "writeConcern": null
            },
            "command_name": "commitTransaction",
            "database_name": "admin"
          }
        }
      ],
      "outcome": {
        "collection": {
          "data": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            },
            {
              "_id": 4
            }
          ]
        }
      }
    }
  ]
}

Zerion Mini Shell 1.0