from__future__importannotations# For type hinting before definition, ref: https://stackoverflow.com/questions/33533148/how-do-i-specify-that-the-return-type-of-a-method-is-the-same-as-the-class-itsel
importsys
importos
importtraceback
# Require Python 3
ifsys.version_info[0]<3:
...
...
@@ -1168,6 +1169,24 @@ class DropFixedSuperTableTask(StateTransitionTask):
classAddFixedDataTask(StateTransitionTask):
activeTable:Set[int]=set()# Track which table is being actively worked on
LARGE_NUMBER_OF_TABLES=35
SMALL_NUMBER_OF_TABLES=3
LARGE_NUMBER_OF_RECORDS=50
SMALL_NUMBER_OF_RECORDS=3
# We use these two files to record operations to DB, useful for power-off tests
fAddLogReady=None
fAddLogDone=None
@classmethod
defprepToRecordOps(cls):
ifgConfig.record_ops:
if(cls.fAddLogReady==None):
logger.info("Recording in a file operations to be performed...")
cls.fAddLogReady=open("add_log_ready.txt","w")
if(cls.fAddLogDone==None):
logger.info("Recording in a file operations completed...")
cls.fAddLogDone=open("add_log_done.txt","w")
@classmethod
defgetInfo(cls):
...
...
@@ -1183,7 +1202,7 @@ class AddFixedDataTask(StateTransitionTask):