...

Text file src/go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/sharded/ls_timeout_mongos.yml

Documentation: go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/sharded

     1description: "Parse logicalSessionTimeoutMinutes from mongoses"
     2
     3uri: "mongodb://a,b"
     4
     5phases: [
     6
     7    {
     8        responses: [
     9
    10                ["a:27017", {
    11
    12                    ok: 1,
    13                    helloOk: true,
    14                    isWritablePrimary: true,
    15                    msg: "isdbgrid",
    16                    logicalSessionTimeoutMinutes: 1,
    17                    minWireVersion: 0,
    18                    maxWireVersion: 6
    19                }],
    20
    21                ["b:27017", {
    22
    23                    ok: 1,
    24                    helloOk: true,
    25                    isWritablePrimary: true,
    26                    msg: "isdbgrid",
    27                    logicalSessionTimeoutMinutes: 2,
    28                    minWireVersion: 0,
    29                    maxWireVersion: 6
    30                }]
    31        ],
    32
    33        outcome: {
    34
    35            servers: {
    36
    37                "a:27017": {
    38
    39                    type: "Mongos",
    40                    setName:
    41                },
    42
    43                "b:27017": {
    44
    45                    type: "Mongos",
    46                    setName:
    47                }
    48            },
    49            topologyType: "Sharded",
    50            logicalSessionTimeoutMinutes: 1,  # Minimum of the two
    51            setName:
    52        }
    53    },
    54    # Now an isWritablePrimary response with no logicalSessionTimeoutMinutes
    55    {
    56        responses: [
    57
    58                ["a:27017", {
    59
    60                    ok: 1,
    61                    helloOk: true,
    62                    isWritablePrimary: true,
    63                    msg: "isdbgrid",
    64                    logicalSessionTimeoutMinutes: 1,
    65                    minWireVersion: 0,
    66                    maxWireVersion: 6
    67                }],
    68
    69                ["b:27017", {
    70
    71                    ok: 1,
    72                    helloOk: true,
    73                    isWritablePrimary: true,
    74                    msg: "isdbgrid",
    75                    minWireVersion: 0,
    76                    maxWireVersion: 6
    77                }]
    78        ],
    79
    80        outcome: {
    81
    82            servers: {
    83
    84                "a:27017": {
    85
    86                    type: "Mongos",
    87                    setName:
    88                },
    89
    90                "b:27017": {
    91
    92                    type: "Mongos",
    93                    setName:
    94                }
    95            },
    96            topologyType: "Sharded",
    97            logicalSessionTimeoutMinutes: null,  # Sessions not supported now
    98            setName:
    99        }
   100    }
   101]

View as plain text