Skip to content

Commit

Permalink
Merge pull request #113 from FalkorDB/106-update-falkordb-image-to-v421
Browse files Browse the repository at this point in the history
Fix cluster tests
  • Loading branch information
dudizimber authored Sep 9, 2024
2 parents 30755c1 + 3486c0a commit 2124792
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions omnistrate_tests/classes/omnistrate_fleet_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
6 changes: 5 additions & 1 deletion omnistrate_tests/test_update_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
sys.path.remove(str(parent))

import logging

logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(message)s")

import time
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 2124792

Please sign in to comment.