test_concurrency_safety
Simulates concurrent write or edit operations on one temporary file to verify that file locking prevents data corruption and reports whether concurrency safety holds.
Instructions
Test that file_ops write/edit locking prevents data corruption under concurrent load.
Simulates num_clients simultaneously writing or editing the same temp file. All should succeed without data corruption if locking is working correctly.
Return Format
{"test_operation": str, "num_clients": int, "successful": int, "errors": [str], "concurrency_safe": bool}
Examples
test_concurrency_safety(operation="write", num_clients=5) test_concurrency_safety(operation="edit", num_clients=10)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | write | |
| num_clients | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||