| 654 | |
| 655 | |
| 656 | def teardown_package(): |
| 657 | if USE_CASS_EXTERNAL or KEEP_TEST_CLUSTER: |
| 658 | return |
| 659 | # when multiple modules are run explicitly, this runs between them |
| 660 | # need to make sure CCM_CLUSTER is properly cleared for that case |
| 661 | remove_cluster() |
| 662 | for cluster_name in [CLUSTER_NAME, MULTIDC_CLUSTER_NAME]: |
| 663 | try: |
| 664 | cluster = CCMClusterFactory.load(path, cluster_name) |
| 665 | try: |
| 666 | cluster.remove() |
| 667 | log.info('Removed cluster: %s' % cluster_name) |
| 668 | except Exception: |
| 669 | log.exception('Failed to remove cluster: %s' % cluster_name) |
| 670 | |
| 671 | except Exception: |
| 672 | log.warning('Did not find cluster: %s' % cluster_name) |
| 673 | |
| 674 | |
| 675 | def execute_until_pass(session, query): |