Merge pull request #24326 from taosdata/td-28141

update alter_database test case for arm64 ci
This commit is contained in:
Alex Duan 2024-01-03 18:22:10 +08:00 committed by GitHub
commit 22016844bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -4,7 +4,8 @@ import time
import socket
import os
import threading
import psutil
import platform
from util.log import *
from util.sql import *
from util.cases import *
@ -17,6 +18,14 @@ class TDTestCase:
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
self.buffer_boundary = [3, 4097, 8193, 12289, 16384]
# remove the value > free_memory, 70% is the weight to calculate the max value
if platform.system() == "Linux" and platform.machine() == "aarch64":
mem = psutil.virtual_memory()
free_memory = mem.free * 0.7 / 1024 / 1024
for item in self.buffer_boundary:
if item > free_memory:
self.buffer_boundary.remove(item)
self.buffer_error = [self.buffer_boundary[0] -
1, self.buffer_boundary[-1]+1]
# pages_boundary >= 64