diff --git a/.github/workflows/build-test-image.yaml b/.github/workflows/build-test-image.yaml index 53019da..77e8b34 100644 --- a/.github/workflows/build-test-image.yaml +++ b/.github/workflows/build-test-image.yaml @@ -248,7 +248,7 @@ jobs: subscriptionId: sub-GJPV3NoNC0 serviceId: ${{ vars.OMNISTRATE_INTERNAL_SERVICE_ID }} environmentId: ${{ vars.OMNISTRATE_INTERNAL_DEV_ENVIRONMENT}} - extraParams: "--resource-key 'cluster-Single-Zone' --instance-name 'test-cluster-upgrade' --instance-description 'test-cluster-upgrade' --instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always'" + extraParams: "--resource-key 'cluster-Single-Zone' --instance-name 'test-cluster-upgrade' --instance-description 'test-cluster-upgrade' --instance-type 'e2-custom-4-8192' --storage-size '30' --rdb-config 'medium' --aof-config 'always' --cluster-replicas '1' --host-count '6'" - name: PRO/ClusterSingleZone - GCP/us-central1 - Failover & Persistence if: "true" testFile: test_cluster.py diff --git a/omnistrate_tests/classes/omnistrate_fleet_instance.py b/omnistrate_tests/classes/omnistrate_fleet_instance.py index fb15fd1..c16ad5f 100644 --- a/omnistrate_tests/classes/omnistrate_fleet_instance.py +++ b/omnistrate_tests/classes/omnistrate_fleet_instance.py @@ -255,7 +255,7 @@ def stop(self, wait_for_ready: bool, retry=10): data=json.dumps({"resourceId": self.get_resource_id()}), ) - if "another operation is already in progress" in response.text and retry > 0: + if "operation is already in progress" in response.text and retry > 0: time.sleep(90) return self.stop(wait_for_ready, retry - 1) @@ -280,7 +280,7 @@ def start(self, wait_for_ready: bool, retry=10): data=json.dumps({"resourceId": self.get_resource_id()}), ) - if "another operation is already in progress" in response.text and retry > 0: + if "operation is already in progress" in response.text and retry > 0: time.sleep(90) return self.start(wait_for_ready, retry - 1) @@ -313,7 +313,7 @@ def trigger_failover( timeout=15, ) - if "another operation is already in progress" in response.text and retry > 0: + if "operation is already in progress" in response.text and retry > 0: time.sleep(90) return self.trigger_failover( replica_id, wait_for_ready, resource_id, retry - 1 @@ -354,7 +354,7 @@ def update_params(self, wait_until_ready: bool = True, retry=10, **kwargs): timeout=15, ) - if "another operation is already in progress" in response.text and retry > 0: + if "operation is already in progress" in response.text and retry > 0: time.sleep(90) return self.update_params(wait_until_ready, retry - 1, **kwargs) diff --git a/omnistrate_tests/test_update_memory.py b/omnistrate_tests/test_update_memory.py index a9a300b..6970cf3 100644 --- a/omnistrate_tests/test_update_memory.py +++ b/omnistrate_tests/test_update_memory.py @@ -13,6 +13,7 @@ sys.path.remove(str(parent)) import logging + logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(message)s") import time @@ -54,11 +55,14 @@ instance: OmnistrateFleetInstance = None + # Intercept exit signals so we can delete the instance before exiting def signal_handler(sig, frame): if instance: instance.delete(False) sys.exit(0) + + signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) @@ -146,7 +150,7 @@ def add_data(instance: OmnistrateFleetInstance): def query_data(instance: OmnistrateFleetInstance): # Get instance host and port - db = instance.create_connection(ssl=args.tls) + db = instance.create_connection(ssl=args.tls, force_reconnect=True) graph = db.select_graph("test")