|
47 | 47 | }
|
48 | 48 | }
|
49 | 49 | ],
|
| 50 | + "_yamlAnchors": { |
| 51 | + "namespace": "logging-tests.server-selection" |
| 52 | + }, |
50 | 53 | "tests": [
|
51 | 54 | {
|
52 | 55 | "description": "Successful bulkWrite operation: log messages have operationIds",
|
|
224 | 227 | ]
|
225 | 228 | }
|
226 | 229 | ]
|
| 230 | + }, |
| 231 | + { |
| 232 | + "description": "Successful client bulkWrite operation: log messages have operationIds", |
| 233 | + "runOnRequirements": [ |
| 234 | + { |
| 235 | + "minServerVersion": "8.0", |
| 236 | + "serverless": "forbid" |
| 237 | + } |
| 238 | + ], |
| 239 | + "operations": [ |
| 240 | + { |
| 241 | + "name": "waitForEvent", |
| 242 | + "object": "testRunner", |
| 243 | + "arguments": { |
| 244 | + "client": "client", |
| 245 | + "event": { |
| 246 | + "topologyDescriptionChangedEvent": {} |
| 247 | + }, |
| 248 | + "count": 2 |
| 249 | + } |
| 250 | + }, |
| 251 | + { |
| 252 | + "name": "clientBulkWrite", |
| 253 | + "object": "client", |
| 254 | + "arguments": { |
| 255 | + "models": [ |
| 256 | + { |
| 257 | + "insertOne": { |
| 258 | + "namespace": "logging-tests.server-selection", |
| 259 | + "document": { |
| 260 | + "x": 1 |
| 261 | + } |
| 262 | + } |
| 263 | + } |
| 264 | + ] |
| 265 | + } |
| 266 | + } |
| 267 | + ], |
| 268 | + "expectLogMessages": [ |
| 269 | + { |
| 270 | + "client": "client", |
| 271 | + "messages": [ |
| 272 | + { |
| 273 | + "level": "debug", |
| 274 | + "component": "serverSelection", |
| 275 | + "data": { |
| 276 | + "message": "Server selection started", |
| 277 | + "operationId": { |
| 278 | + "$$type": [ |
| 279 | + "int", |
| 280 | + "long" |
| 281 | + ] |
| 282 | + }, |
| 283 | + "operation": "bulkWrite" |
| 284 | + } |
| 285 | + }, |
| 286 | + { |
| 287 | + "level": "debug", |
| 288 | + "component": "serverSelection", |
| 289 | + "data": { |
| 290 | + "message": "Server selection succeeded", |
| 291 | + "operationId": { |
| 292 | + "$$type": [ |
| 293 | + "int", |
| 294 | + "long" |
| 295 | + ] |
| 296 | + }, |
| 297 | + "operation": "bulkWrite" |
| 298 | + } |
| 299 | + } |
| 300 | + ] |
| 301 | + } |
| 302 | + ] |
| 303 | + }, |
| 304 | + { |
| 305 | + "description": "Failed client bulkWrite operation: log messages have operationIds", |
| 306 | + "runOnRequirements": [ |
| 307 | + { |
| 308 | + "minServerVersion": "8.0", |
| 309 | + "serverless": "forbid" |
| 310 | + } |
| 311 | + ], |
| 312 | + "operations": [ |
| 313 | + { |
| 314 | + "name": "failPoint", |
| 315 | + "object": "testRunner", |
| 316 | + "arguments": { |
| 317 | + "client": "failPointClient", |
| 318 | + "failPoint": { |
| 319 | + "configureFailPoint": "failCommand", |
| 320 | + "mode": "alwaysOn", |
| 321 | + "data": { |
| 322 | + "failCommands": [ |
| 323 | + "hello", |
| 324 | + "ismaster" |
| 325 | + ], |
| 326 | + "appName": "loggingClient", |
| 327 | + "closeConnection": true |
| 328 | + } |
| 329 | + } |
| 330 | + } |
| 331 | + }, |
| 332 | + { |
| 333 | + "name": "waitForEvent", |
| 334 | + "object": "testRunner", |
| 335 | + "arguments": { |
| 336 | + "client": "client", |
| 337 | + "event": { |
| 338 | + "serverDescriptionChangedEvent": { |
| 339 | + "newDescription": { |
| 340 | + "type": "Unknown" |
| 341 | + } |
| 342 | + } |
| 343 | + }, |
| 344 | + "count": 1 |
| 345 | + } |
| 346 | + }, |
| 347 | + { |
| 348 | + "name": "clientBulkWrite", |
| 349 | + "object": "client", |
| 350 | + "arguments": { |
| 351 | + "models": [ |
| 352 | + { |
| 353 | + "insertOne": { |
| 354 | + "namespace": "logging-tests.server-selection", |
| 355 | + "document": { |
| 356 | + "x": 1 |
| 357 | + } |
| 358 | + } |
| 359 | + } |
| 360 | + ] |
| 361 | + }, |
| 362 | + "expectError": { |
| 363 | + "isClientError": true |
| 364 | + } |
| 365 | + } |
| 366 | + ], |
| 367 | + "expectLogMessages": [ |
| 368 | + { |
| 369 | + "client": "client", |
| 370 | + "messages": [ |
| 371 | + { |
| 372 | + "level": "debug", |
| 373 | + "component": "serverSelection", |
| 374 | + "data": { |
| 375 | + "message": "Server selection started", |
| 376 | + "operationId": { |
| 377 | + "$$type": [ |
| 378 | + "int", |
| 379 | + "long" |
| 380 | + ] |
| 381 | + }, |
| 382 | + "operation": "bulkWrite" |
| 383 | + } |
| 384 | + }, |
| 385 | + { |
| 386 | + "level": "info", |
| 387 | + "component": "serverSelection", |
| 388 | + "data": { |
| 389 | + "message": "Waiting for suitable server to become available", |
| 390 | + "operationId": { |
| 391 | + "$$type": [ |
| 392 | + "int", |
| 393 | + "long" |
| 394 | + ] |
| 395 | + }, |
| 396 | + "operation": "bulkWrite" |
| 397 | + } |
| 398 | + }, |
| 399 | + { |
| 400 | + "level": "debug", |
| 401 | + "component": "serverSelection", |
| 402 | + "data": { |
| 403 | + "message": "Server selection failed", |
| 404 | + "operationId": { |
| 405 | + "$$type": [ |
| 406 | + "int", |
| 407 | + "long" |
| 408 | + ] |
| 409 | + }, |
| 410 | + "operation": "bulkWrite" |
| 411 | + } |
| 412 | + } |
| 413 | + ] |
| 414 | + } |
| 415 | + ] |
227 | 416 | }
|
228 | 417 | ]
|
229 | 418 | }
|
0 commit comments