|
| 1 | +action,ms,bytes,lang,code,repeat,minver,comment |
| 2 | +beforeany,0,0,q,system "sleep 5",1,,"Wait for processes to start" |
| 3 | +before,0,0,q,.servers.startup[],1,,"Start connection management" |
| 4 | +before,0,0,q,system "sleep 2",1,,"Wait for connections" |
| 5 | +before,0,0,q,stpHandle:gethandle[`stp1],1,,"Open handle to STP" |
| 6 | +before,0,0,q,wdbEnumHandle:gethandle[`wdbenum],1,,"Open handle to WDB enum" |
| 7 | +before,0,0,q,idbHandle:gethandle[`idbenum],1,,"Open handle to IDB" |
| 8 | +before,0,0,q,hdbEnumHandle:gethandle[`hdbenum],1,,"Open handle to partbyenum HDB" |
| 9 | +before,0,0,q,"wdbEnumSym:` sv (wdbEnumHandle(`.wdb.hdbsettings;`hdbdir)),`sym",1,,"Get location of partbyenum hdb sym file" |
| 10 | +before,0,0,q,wdbEnumHandle(set;`.wdb.numtab;`quote`trade!12 15),1,,"Set low treshold numbers for merging on partbyenum WDB" |
| 11 | + |
| 12 | +before,0,0,q,stpHandle(`.stplg.init;testlogdb),1,,"Create test stplog test directory" |
| 13 | +before,0,0,q,logdir:1_string stpHandle(`.stplg.dldir),1,,"Get location of log directory" |
| 14 | +before,0,0,q,.proc.sys "sleep 3",1,,"Wait for connections to get set up" |
| 15 | +before,0,0,q,.os.md temphdbpartbyenumdir,1,,"Creating HDB directory for partbyenum DB" |
| 16 | + |
| 17 | +run,0,0,q,"stpHandle @/: `.u.upd ,/: ((`trade;testtrade);(`quote;testquote))",1,,"Send trade and quote updates to STP" |
| 18 | +run,0,0,q,.proc.sys "sleep 2",1,,"Wait for updates to publish" |
| 19 | +true,0,0,q,count[first testtrade]~wdbEnumHandle "count trade",1,,"Check trade update was correctly published to partbyenum WDB" |
| 20 | +true,0,0,q,count[first testquote]~wdbEnumHandle "count quote",1,,"Check quote update was correctly published to partbyenum WDB" |
| 21 | + |
| 22 | +run,0,0,q,"stpHandle @/: `.u.upd ,/: ((`trade;testtrade);(`quote;testquote))",1,,"Send trade and quote updates to STP to force a writedown" |
| 23 | +run,0,0,q,.proc.sys "sleep 3",1,,"Wait for updates to publish and writedown to happen" |
| 24 | +true,0,0,q,"all (distinct `TORQNULLSYMBOL^(testtrade[0]),(testquote[0])) in get wdbEnumSym",1,,"Check if all symbols are enumerated against partbyenum hdb sym, fill null sym in test data with TORQNULLSYMBOL to confirm this has been enumerated against" |
| 25 | + |
| 26 | +true,0,0,q,all {any x like/: y}[;folder_patterns] exec ptdir from wdbEnumHandle `.merge.partsizes,1,,"Check if all partitions are placed in the correct enumerated tables in the partbyenum WDB dir" |
| 27 | + |
| 28 | +true,0,0,q,(2*count[where null [first[testquote]]]) ~ idbHandle"count select from quote where int=maptoint[`]",1,,"Check maptoint function is querying null sym correctly on quote" |
| 29 | +true,0,0,q,(2*count[where null [first[testquote]]]) ~ idbHandle"count select from trade where int=maptoint[`]",1,,"Check maptoint function is querying null sym correctly on trade" |
| 30 | + |
| 31 | +run,0,0,q,wdbEnumHandle(`.u.end;`.wdb.currentpartition),1,,"Trigger EOD on partbyenum WDB" |
| 32 | +run,0,0,q,.proc.sys "sleep 5",1,,"Wait for merge to HDB to happen" |
| 33 | +true,0,0,q,(2*count[first testtrade])~hdbEnumHandle "count select from trade",1,,"Check trade in hdb" |
| 34 | +true,0,0,q,(2*count[first testquote])~hdbEnumHandle "count select from quote",1,,"Check quote in hdb" |
| 35 | + |
| 36 | +after,0,0,q,hclose each (wdbEnumHandle;stpHandle;idbHandle;hdbEnumHandle);,1,,"Close handles" |
| 37 | +after,0,0,q,kill9proc each ("stp1";"wdbenum";"hdbenum";"idbenum";"sort1"),1,,"Stop all procs" |
| 38 | +after,0,0,q,.os.deldir logdir,1,,"Delete test segmented tickerplant logs" |
| 39 | +after,0,0,q,.os.deldir 1_string temphdbpartbyenumdir,1,,"Delete temp WDB" |
| 40 | +after,0,0,q,.os.deldir 1_string wdbpartbyenumdir,1,,"Delete temp WDB" |
0 commit comments