fix go1.22 download link in packaging (#939) #709
GitHub Actions / JUnit Test Report
failed
May 6, 2024 in 0s
17 tests run, 15 passed, 1 skipped, 1 failed.
Annotations
Check failure on line 88 in psmdb-testing/pbm-functional/pytest/test_PBM-1090.py
github-actions / JUnit Test Report
test_PBM-1090.test_logical_PBM_T204
Failed: Timeout >300.0s
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f1c8af627d0>
@pytest.mark.timeout(300,func_only=True)
def test_logical_PBM_T204(start_cluster,cluster):
cluster.check_pbm_status()
client = pymongo.MongoClient(cluster.connection)
db = client.test
collection = db.test
Cluster.log("Create collection, unique index and insert data")
collection.insert_one({"a": 1, "b": 1, "c": 1})
collection.create_index([("a",1),("b",1),("c",1)], name='test_index', unique = True)
res = pymongo.MongoClient(cluster.connection)["test"]["test"].find({})
Cluster.log('Collection:')
for r in res:
Cluster.log(r)
def upsert_1():
Cluster.log("Starting background upsert 1")
while upsert:
query = {"a": 1}
update = {"$set": {"a": 1, "b": 1, "c": 1}}
pymongo.MongoClient(cluster.connection)['test']['test'].delete_one(query)
try:
doc = pymongo.MongoClient(cluster.connection)['test']['test'].find_one_and_update(query,update,upsert=True,return_document=pymongo.collection.ReturnDocument.AFTER)
#Cluster.log(doc)
except pymongo.errors.DuplicateKeyError:
pass
Cluster.log("Stopping background upsert 1")
def upsert_2():
Cluster.log("Starting background upsert 2")
while upsert:
query = {"b": 1}
update = {"$set": {"a": 2, "b": 1, "c": 1}}
pymongo.MongoClient(cluster.connection)['test']['test'].delete_one(query)
try:
doc = pymongo.MongoClient(cluster.connection)['test']['test'].find_one_and_update(query,update,upsert=True,return_document=pymongo.collection.ReturnDocument.AFTER)
#Cluster.log(doc)
except pymongo.errors.DuplicateKeyError:
pass
Cluster.log("Stopping background upsert 2")
upsert=True
t1 = threading.Thread(target=upsert_1)
t2 = threading.Thread(target=upsert_2)
t1.start()
t2.start()
> backup = cluster.make_backup("logical")
test_PBM-1090.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7f1c8af627d0>, type = 'logical'
def make_backup(self, type):
n = testinfra.get_host("docker://" + self.pbm_cli)
timeout = time.time() + 120
while True:
running = self.get_status()['running']
Cluster.log("Current operation: " + str(running))
if not running:
if type:
start = n.run(
'pbm backup --out=json --type=' + type)
else:
start = n.run('pbm backup --out=json')
if start.rc == 0:
name = json.loads(start.stdout)['name']
Cluster.log("Backup started")
break
elif "resync" in start.stdout:
Cluster.log("Resync in progress, retrying: " + start.stdout)
else:
assert False, "Backup failed" + start.stdout + start.stderr
if time.time() > timeout:
assert False, "Timeout for backup start exceeded"
time.sleep(1)
timeout = time.time() + 900
while True:
status = self.get_status()
Cluster.log("Current operation: " + str(status['running']))
if status['backups']['snapshot']:
for snapshot in status['backups']['snapshot']:
if snapshot['name'] == name:
if snapshot['status'] == 'done':
Cluster.log("Backup found: " + str(snapshot))
return name
break
elif snapshot['status'] == 'error':
self.get_logs()
assert False, snapshot['error']
break
if time.time() > timeout:
assert False, "Backup timeout exceeded"
> time.sleep(1)
E Failed: Timeout >300.0s
cluster.py:413: Failed
Loading