Skip to content

PYTHON-2308 Test that we exclusively depend on existence of logicalSessionsTimeoutMinutes for sessions support #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 0 additions & 165 deletions test/sessions/dirty-session-errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,171 +21,6 @@
}
],
"tests": [
{
"description": "Clean explicit session is not discarded",
"operations": [
{
"name": "assertSessionNotDirty",
"object": "testRunner",
"arguments": {
"session": "session0"
}
},
{
"name": "insertOne",
"object": "collection",
"arguments": {
"session": "session0",
"document": {
"_id": 2
}
},
"result": {
"insertedId": 2
}
},
{
"name": "assertSessionNotDirty",
"object": "testRunner",
"arguments": {
"session": "session0"
}
},
{
"name": "endSession",
"object": "session0"
},
{
"name": "find",
"object": "collection",
"arguments": {
"filter": {
"_id": -1
}
},
"result": []
},
{
"name": "assertSameLsidOnLastTwoCommands",
"object": "testRunner"
}
],
"expectations": [
{
"command_started_event": {
"command": {
"insert": "test",
"documents": [
{
"_id": 2
}
],
"ordered": true,
"lsid": "session0"
},
"command_name": "insert",
"database_name": "session-tests"
}
},
{
"command_started_event": {
"command": {
"find": "test",
"filter": {
"_id": -1
},
"lsid": "session0"
},
"command_name": "find",
"database_name": "session-tests"
}
}
],
"outcome": {
"collection": {
"data": [
{
"_id": 1
},
{
"_id": 2
}
]
}
}
},
{
"description": "Clean implicit session is not discarded",
"operations": [
{
"name": "insertOne",
"object": "collection",
"arguments": {
"document": {
"_id": 2
}
},
"result": {
"insertedId": 2
}
},
{
"name": "find",
"object": "collection",
"arguments": {
"filter": {
"_id": -1
}
},
"result": []
},
{
"name": "assertSameLsidOnLastTwoCommands",
"object": "testRunner"
}
],
"expectations": [
{
"command_started_event": {
"command": {
"insert": "test",
"documents": [
{
"_id": 2
}
],
"ordered": true
},
"command_name": "insert",
"database_name": "session-tests"
}
},
{
"command_started_event": {
"command": {
"find": "test",
"filter": {
"_id": -1
}
},
"command_name": "find",
"database_name": "session-tests"
}
}
],
"outcome": {
"collection": {
"data": [
{
"_id": 1
},
{
"_id": 2
}
]
}
}
},
{
"description": "Dirty explicit session is discarded",
"clientOptions": {
Expand Down
181 changes: 181 additions & 0 deletions test/sessions/server-support.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"runOn": [
{
"minServerVersion": "3.6.0"
}
],
"database_name": "session-tests",
"collection_name": "test",
"data": [
{
"_id": 1
}
],
"tests": [
{
"description": "Server supports explicit sessions",
"operations": [
{
"name": "assertSessionNotDirty",
"object": "testRunner",
"arguments": {
"session": "session0"
}
},
{
"name": "insertOne",
"object": "collection",
"arguments": {
"session": "session0",
"document": {
"_id": 2
}
},
"result": {
"insertedId": 2
}
},
{
"name": "assertSessionNotDirty",
"object": "testRunner",
"arguments": {
"session": "session0"
}
},
{
"name": "endSession",
"object": "session0"
},
{
"name": "find",
"object": "collection",
"arguments": {
"filter": {
"_id": -1
}
},
"result": []
},
{
"name": "assertSameLsidOnLastTwoCommands",
"object": "testRunner"
}
],
"expectations": [
{
"command_started_event": {
"command": {
"insert": "test",
"documents": [
{
"_id": 2
}
],
"ordered": true,
"lsid": "session0"
},
"command_name": "insert",
"database_name": "session-tests"
}
},
{
"command_started_event": {
"command": {
"find": "test",
"filter": {
"_id": -1
},
"lsid": "session0"
},
"command_name": "find",
"database_name": "session-tests"
}
}
],
"outcome": {
"collection": {
"data": [
{
"_id": 1
},
{
"_id": 2
}
]
}
}
},
{
"description": "Server supports implicit sessions",
"operations": [
{
"name": "insertOne",
"object": "collection",
"arguments": {
"document": {
"_id": 2
}
},
"result": {
"insertedId": 2
}
},
{
"name": "find",
"object": "collection",
"arguments": {
"filter": {
"_id": -1
}
},
"result": []
},
{
"name": "assertSameLsidOnLastTwoCommands",
"object": "testRunner"
}
],
"expectations": [
{
"command_started_event": {
"command": {
"insert": "test",
"documents": [
{
"_id": 2
}
],
"ordered": true
},
"command_name": "insert",
"database_name": "session-tests"
}
},
{
"command_started_event": {
"command": {
"find": "test",
"filter": {
"_id": -1
}
},
"command_name": "find",
"database_name": "session-tests"
}
}
],
"outcome": {
"collection": {
"data": [
{
"_id": 1
},
{
"_id": 2
}
]
}
}
}
]
}