Run fuzz tests with different capacities
()
| 503 | |
| 504 | |
| 505 | def run_varied_capacity_tests(): |
| 506 | """Run fuzz tests with different capacities""" |
| 507 | capacities = [3, 4, 5, 8, 16] |
| 508 | all_passed = True |
| 509 | |
| 510 | for capacity in capacities: |
| 511 | print(f"\n{'='*60}") |
| 512 | print(f"Testing with capacity {capacity}") |
| 513 | print("=" * 60) |
| 514 | |
| 515 | tester = BPlusTreeFuzzTester( |
| 516 | capacity=capacity, prepopulate=500 |
| 517 | ) # Pre-populate each test |
| 518 | if not tester.run_fuzz_test( |
| 519 | 50000 |
| 520 | ): # 50k ops per capacity (reduced due to prepopulation) |
| 521 | all_passed = False |
| 522 | print(f"❌ FAILED with capacity {capacity}") |
| 523 | else: |
| 524 | print(f"✅ PASSED with capacity {capacity}") |
| 525 | |
| 526 | return all_passed |
| 527 | |
| 528 | |
| 529 | if __name__ == "__main__": |
no test coverage detected