Merge pull request #24326 from taosdata/td-28141
update alter_database test case for arm64 ci
This commit is contained in:
commit
22016844bc
|
@ -4,7 +4,8 @@ import time
|
||||||
import socket
|
import socket
|
||||||
import os
|
import os
|
||||||
import threading
|
import threading
|
||||||
|
import psutil
|
||||||
|
import platform
|
||||||
from util.log import *
|
from util.log import *
|
||||||
from util.sql import *
|
from util.sql import *
|
||||||
from util.cases import *
|
from util.cases import *
|
||||||
|
@ -17,6 +18,14 @@ class TDTestCase:
|
||||||
tdLog.debug("start to execute %s" % __file__)
|
tdLog.debug("start to execute %s" % __file__)
|
||||||
tdSql.init(conn.cursor(), logSql)
|
tdSql.init(conn.cursor(), logSql)
|
||||||
self.buffer_boundary = [3, 4097, 8193, 12289, 16384]
|
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] -
|
self.buffer_error = [self.buffer_boundary[0] -
|
||||||
1, self.buffer_boundary[-1]+1]
|
1, self.buffer_boundary[-1]+1]
|
||||||
# pages_boundary >= 64
|
# pages_boundary >= 64
|
||||||
|
|
Loading…
Reference in New Issue