-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRIVERS-2578 Drivers use polling SDAM on AWS Lambda
Disable streaming SDAM by default on AWS Lambda and similar FaaS platforms. Introduce the sdamMode=stream/poll/auto URI option.
- Loading branch information
1 parent
674bee7
commit e29f381
Showing
7 changed files
with
374 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
source/server-discovery-and-monitoring/tests/unified/sdamMode.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"description": "sdamMode", | ||
"schemaVersion": "1.3", | ||
"tests": [ | ||
{ | ||
"description": "connect with sdamMode=auto", | ||
"operations": [ | ||
{ | ||
"name": "createEntities", | ||
"object": "testRunner", | ||
"arguments": { | ||
"entities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"uriOptions": { | ||
"sdamMode": "auto" | ||
} | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "dbSdamModeAuto", | ||
"client": "client0", | ||
"databaseName": "sdam-tests" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "runCommand", | ||
"object": "dbSdamModeAuto", | ||
"arguments": { | ||
"commandName": "ping", | ||
"command": { | ||
"ping": 1 | ||
} | ||
}, | ||
"expectResult": { | ||
"ok": 1 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "connect with sdamMode=stream", | ||
"operations": [ | ||
{ | ||
"name": "createEntities", | ||
"object": "testRunner", | ||
"arguments": { | ||
"entities": [ | ||
{ | ||
"client": { | ||
"id": "client1", | ||
"uriOptions": { | ||
"sdamMode": "stream" | ||
} | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "dbSdamModeStream", | ||
"client": "client1", | ||
"databaseName": "sdam-tests" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "runCommand", | ||
"object": "dbSdamModeStream", | ||
"arguments": { | ||
"commandName": "ping", | ||
"command": { | ||
"ping": 1 | ||
} | ||
}, | ||
"expectResult": { | ||
"ok": 1 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "connect with sdamMode=poll", | ||
"operations": [ | ||
{ | ||
"name": "createEntities", | ||
"object": "testRunner", | ||
"arguments": { | ||
"entities": [ | ||
{ | ||
"client": { | ||
"id": "client2", | ||
"uriOptions": { | ||
"sdamMode": "poll" | ||
} | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "dbSdamModePoll", | ||
"client": "client2", | ||
"databaseName": "sdam-tests" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "runCommand", | ||
"object": "dbSdamModePoll", | ||
"arguments": { | ||
"commandName": "ping", | ||
"command": { | ||
"ping": 1 | ||
} | ||
}, | ||
"expectResult": { | ||
"ok": 1 | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
67 changes: 67 additions & 0 deletions
67
source/server-discovery-and-monitoring/tests/unified/sdamMode.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
description: sdamMode | ||
|
||
schemaVersion: "1.3" | ||
|
||
tests: | ||
- description: "connect with sdamMode=auto" | ||
operations: | ||
- name: createEntities | ||
object: testRunner | ||
arguments: | ||
entities: | ||
- client: | ||
id: &client0 client0 | ||
uriOptions: | ||
sdamMode: "auto" | ||
- database: | ||
id: &dbSdamModeAuto dbSdamModeAuto | ||
client: *client0 | ||
databaseName: sdam-tests | ||
- name: runCommand | ||
object: *dbSdamModeAuto | ||
arguments: | ||
commandName: ping | ||
command: { ping: 1 } | ||
expectResult: { ok: 1 } | ||
|
||
- description: "connect with sdamMode=stream" | ||
operations: | ||
- name: createEntities | ||
object: testRunner | ||
arguments: | ||
entities: | ||
- client: | ||
id: &client1 client1 | ||
uriOptions: | ||
sdamMode: "stream" | ||
- database: | ||
id: &dbSdamModeStream dbSdamModeStream | ||
client: *client1 | ||
databaseName: sdam-tests | ||
- name: runCommand | ||
object: *dbSdamModeStream | ||
arguments: | ||
commandName: ping | ||
command: { ping: 1 } | ||
expectResult: { ok: 1 } | ||
|
||
- description: "connect with sdamMode=poll" | ||
operations: | ||
- name: createEntities | ||
object: testRunner | ||
arguments: | ||
entities: | ||
- client: | ||
id: &client2 client2 | ||
uriOptions: | ||
sdamMode: "poll" | ||
- database: | ||
id: &dbSdamModePoll dbSdamModePoll | ||
client: *client2 | ||
databaseName: sdam-tests | ||
- name: runCommand | ||
object: *dbSdamModePoll | ||
arguments: | ||
commandName: ping | ||
command: { ping: 1 } | ||
expectResult: { ok: 1 } |
Oops, something went wrong.