diff --git a/tests/pytest/client/change_time_1_1.py b/tests/pytest/client/change_time_1_1.py index 24e0195a9c..abae49a41f 100644 --- a/tests/pytest/client/change_time_1_1.py +++ b/tests/pytest/client/change_time_1_1.py @@ -51,7 +51,8 @@ class TDTestCase: #move 5 days ahead to 2020/10/25. 4 oldest files should be removed during the new write #leaving 7 data files. os.system ('timedatectl set-time 2020-10-25') - os.system(f"{binPath}taosdemo -f tools/taosdemoAllTest/manual_change_time_1_1_B.json") + os.system(f"{binPath}taosdemo -f tools/taosdemoAllTest/manual_change_time_1_1_B.json") + os.system('sudo timedatectl set-ntp on') commandArray = ['ls', '-l', f'{TDenginePath}/sim/dnode1/data/vnode/vnode2/tsdb/data'] result = subprocess.run(commandArray, stdout=subprocess.PIPE).stdout.decode('utf-8') print(result.count('data')) @@ -61,6 +62,7 @@ class TDTestCase: tdLog.debug("data file number correct") tdSql.query('select first(ts) from stb_0') tdSql.checkData(0,0,datetime(2020,10,14,8,0,0,0)) #check the last data in the database + os.system('sudo timedatectl set-ntp on') def stop(self): os.system('sudo timedatectl set-ntp on') diff --git a/tests/pytest/client/change_time_1_2.py b/tests/pytest/client/change_time_1_2.py index cd1a17926d..855b04873c 100644 --- a/tests/pytest/client/change_time_1_2.py +++ b/tests/pytest/client/change_time_1_2.py @@ -62,6 +62,7 @@ class TDTestCase: tdDnodes.start(1) tdSql.query('select first(ts) from stb_0') tdSql.checkData(0,0,datetime(2020,10,14,8,0,0,0)) #check the last data in the database + os.system('sudo timedatectl set-ntp on') commandArray = ['ls', '-l', f'{TDenginePath}/sim/dnode1/data/vnode/vnode2/tsdb/data'] result = subprocess.run(commandArray, stdout=subprocess.PIPE).stdout.decode('utf-8') print(result.count('data')) @@ -69,8 +70,7 @@ class TDTestCase: tdLog.exit('wrong number of files') else: tdLog.debug("data file number correct") - - + os.system('sudo timedatectl set-ntp on') def stop(self): os.system('sudo timedatectl set-ntp on') diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index fe023acc4b..bab56fa657 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -256,8 +256,6 @@ python3 ./test.py -f client/client.py python3 ./test.py -f client/version.py python3 ./test.py -f client/alterDatabase.py python3 ./test.py -f client/noConnectionErrorTest.py -python3 test.py -f client/change_time_1_1.py -python3 test.py -f client/change_time_1_2.py # Misc python3 testCompress.py @@ -344,4 +342,6 @@ python3 test.py -f alter/alter_keep.py python3 test.py -f alter/alter_cacheLastRow.py python3 ./test.py -f query/querySession.py python3 test.py -f alter/alter_create_exception.py +python3 test.py -f client/change_time_1_1.py +python3 test.py -f client/change_time_1_2.py #======================p4-end===============