PBM-CUSTOM #31
GitHub Actions / JUnit Test Report
failed
Mar 7, 2024 in 0s
1 tests run, 0 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 61 in pbm-functional/pytest/test_PBM-1252.py
github-actions / JUnit Test Report
test_PBM-1252.test_load
AssertionError: set shard's files list: an inserted document is too large
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f5cf392f950>
@pytest.mark.timeout(3600,func_only=True)
def test_load(start_cluster,cluster):
cluster.check_pbm_status()
indexes = []
for i in range(63):
indexes.append(pymongo.IndexModel(str(i),background=True))
for i in range(1500):
database = ''.join(random.choice(string.ascii_lowercase) for _ in range(63))
client=pymongo.MongoClient(cluster.connection)
db = client[database]
db.create_collection("test_collection")
db["test_collection"].create_indexes(indexes)
Cluster.log( database + ": " + str(i))
> backup = cluster.make_backup("physical")
test_PBM-1252.py:61:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7f5cf392f950>, type = 'physical'
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.check_output(
'pbm backup --out=json --type=' + type)
else:
start = n.check_output('pbm backup --out=json')
name = json.loads(start)['name']
Cluster.log("Backup started")
break
if time.time() > timeout:
assert False
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']
E AssertionError: set shard's files list: an inserted document is too large
cluster.py:404: AssertionError
Loading