[TD-4711] trying to solve the problem of ntp not swtich on
This commit is contained in:
parent
67d6339f1a
commit
08a9a1f765
|
@ -56,8 +56,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')
|
||||
try:
|
||||
os.system ('timedatectl set-time 2020-10-25')
|
||||
os.system(f"{binPath}taosdemo -f tools/taosdemoAllTest/manual_change_time_1_1_B.json")
|
||||
except BaseException:
|
||||
os.system('sudo timedatectl set-ntp on')
|
||||
|
@ -78,6 +78,7 @@ class TDTestCase:
|
|||
|
||||
def stop(self):
|
||||
os.system('sudo timedatectl set-ntp on')
|
||||
tdLog.sleep(10)
|
||||
tdSql.close()
|
||||
tdLog.success("alter block manual check finish")
|
||||
|
||||
|
|
|
@ -54,8 +54,14 @@ class TDTestCase:
|
|||
else:
|
||||
tdLog.debug("data file number correct")
|
||||
|
||||
tdSql.query('select first(ts) from stb_0') #check the last data in the database
|
||||
tdSql.checkData(0,0,datetime(2020,10,11,0,0,0,0))
|
||||
|
||||
try:
|
||||
tdSql.query('select first(ts) from stb_0') #check the last data in the database
|
||||
tdSql.checkData(0,0,datetime(2020,10,11,0,0,0,0))
|
||||
except BaseException:
|
||||
os.system('sudo timedatectl set-ntp on')
|
||||
tdLog.sleep(10)
|
||||
|
||||
|
||||
os.system ('timedatectl set-time 2020-10-25')
|
||||
|
||||
|
@ -63,11 +69,17 @@ class TDTestCase:
|
|||
#4 oldest data file should be removed from tsdb/data
|
||||
#7 data file should be found
|
||||
#vnode at TDinternal/community/sim/dnode1/data/vnode
|
||||
os.system ('timedatectl set-time 2020-10-25')
|
||||
tdDnodes.stop(1)
|
||||
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
|
||||
|
||||
try:
|
||||
os.system ('timedatectl set-time 2020-10-25')
|
||||
tdDnodes.stop(1)
|
||||
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
|
||||
except BaseException:
|
||||
os.system('sudo timedatectl set-ntp on')
|
||||
tdLog.sleep(10)
|
||||
|
||||
os.system('sudo timedatectl set-ntp on')
|
||||
tdLog.sleep(10)
|
||||
commandArray = ['ls', '-l', f'{TDenginePath}/sim/dnode1/data/vnode/vnode2/tsdb/data']
|
||||
|
|
Loading…
Reference in New Issue