( configuration: TestConfiguration )
| 474 | } |
| 475 | |
| 476 | export async function makeMultiBatchWrite( |
| 477 | configuration: TestConfiguration |
| 478 | ): Promise<AnyClientBulkWriteModel<any>[]> { |
| 479 | const { maxBsonObjectSize, maxMessageSizeBytes } = await configuration.hello(); |
| 480 | |
| 481 | const length = maxMessageSizeBytes / maxBsonObjectSize + 1; |
| 482 | const models = Array.from({ length }, () => ({ |
| 483 | namespace: 'db.coll', |
| 484 | name: 'insertOne' as const, |
| 485 | document: { a: 'b'.repeat(maxBsonObjectSize - 500) } |
| 486 | })); |
| 487 | |
| 488 | return models; |
| 489 | } |
| 490 | |
| 491 | export async function makeMultiResponseBatchModelArray( |
| 492 | configuration: TestConfiguration |
no test coverage detected