XOBVLJU ;; mjk/alb - VistALink JUNIT Testers ; 07/27/2002 13:00
;;1.5;VistALink;;Sep 09, 2005
;;Foundations Toolbox Release v1.5 [Build: 1.5.0.026]
;
QUIT
;
; ----------------------------------------------------------
; XOB Remote Procedure JUnit Testers
; ----------------------------------------------------------
;
VERRP(XOBY) ; -- rpc: XOBV TEST JUNIT RPC VERSION
SET XOBY=$GET(XWBAPVER,"XWBAPVER not defined")
QUIT
;
; ----------- Switching RPC Format On-The-Fly Tests ---------
XA2GRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH ARR2GLB
NEW X
SET XOBY=$NAME(^TMP("XOB VL TEST",$JOB))
KILL @XOBY
MERGE @XOBY=XOBARR
SET X=$$RTRNFMT^XWBLIB("GLOBAL ARRAY",1)
QUIT
;
XG2ARP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH GLB2ARR
NEW X
MERGE XOBY=XOBARR
SET X=$$RTRNFMT^XWBLIB("ARRAY",1)
QUIT
;
XA2SRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH ARR2SV
NEW X,XOBRET,I
SET XOBRET=""
SET I=""
FOR SET I=$ORDER(XOBARR(I)) QUIT:I="" SET XOBRET=XOBRET_XOBARR(I)_":"
SET XOBY=XOBRET
SET X=$$RTRNFMT^XWBLIB("SINGLE VALUE")
QUIT
;
XS2ARP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH SV2ARR
NEW X
MERGE XOBY=XOBARR
SET X=$$RTRNFMT^XWBLIB("ARRAY",1)
QUIT
;
XG2SRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH GLB2SV
NEW X,Y,I
SET Y=""
SET I=""
FOR SET I=$ORDER(XOBARR(I)) QUIT:I="" SET Y=Y_XOBARR(I)_"/"
SET XOBY=Y
SET X=$$RTRNFMT^XWBLIB("SINGLE VALUE")
QUIT
;
XS2GRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH SV2GLB
NEW X
SET XOBY=$NAME(^TMP("XOB VL TEST",$JOB))
KILL @XOBY
MERGE @XOBY=XOBARR
SET X=$$RTRNFMT^XWBLIB("GLOBAL ARRAY",1)
QUIT
;
RPCTO(XOBY,XOBTTYP) ; -- rpc: graceful timeout : XOBV TEST JUNIT RPC TIMEOUT
; -- used to test graceful but not waiting
IF XOBTTYP="NO TIMEOUT CHECK" SET XOBY=$$NOTOCHK() QUIT
; -- used to test timeout reset
IF XOBTTYP="RESET TIMEOUT" DO RESET() SET XOBY=$$RESET() QUIT
; -- used to test force timeout
IF XOBTTYP="FORCE TIMEOUT" DO FORCE() SET XOBY=$$FORCE() QUIT
QUIT
;
NOTOCHK() ; -- no timeout check
QUIT "No Timeout Check Return"
;
RESET() ; -- reset RPC timeout
FOR HANG 1 IF $$STOP^XOBVLIB() DO QUIT
. NEW TO,I,X
. SET TO=$$GETTO^XOBVLIB()
. FOR I=2:1 DO QUIT:'X
. . SET X=$$SETTO^XOBVLIB(TO*I)
. . SET X=$$STOP^XOBVLIB()
QUIT "Reset Timeout Return"
;
FORCE() ; -- force RPC timeout
FOR HANG 1 IF $$STOP^XOBVLIB() QUIT
QUIT "Forced Timeout return"
;
XOBVLJU ;; mjk/alb - VistALink JUNIT Testers ; 07/27/2002 13:00
+1 ;;1.5;VistALink;;Sep 09, 2005
+2 ;;Foundations Toolbox Release v1.5 [Build: 1.5.0.026]
+3 ;
+4 QUIT
+5 ;
+6 ; ----------------------------------------------------------
+7 ; XOB Remote Procedure JUnit Testers
+8 ; ----------------------------------------------------------
+9 ;
VERRP(XOBY) ; -- rpc: XOBV TEST JUNIT RPC VERSION
+1 SET XOBY=$GET(XWBAPVER,"XWBAPVER not defined")
+2 QUIT
+3 ;
+4 ; ----------- Switching RPC Format On-The-Fly Tests ---------
XA2GRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH ARR2GLB
+1 NEW X
+2 SET XOBY=$NAME(^TMP("XOB VL TEST",$JOB))
+3 KILL @XOBY
+4 MERGE @XOBY=XOBARR
+5 SET X=$$RTRNFMT^XWBLIB("GLOBAL ARRAY",1)
+6 QUIT
+7 ;
XG2ARP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH GLB2ARR
+1 NEW X
+2 MERGE XOBY=XOBARR
+3 SET X=$$RTRNFMT^XWBLIB("ARRAY",1)
+4 QUIT
+5 ;
XA2SRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH ARR2SV
+1 NEW X,XOBRET,I
+2 SET XOBRET=""
+3 SET I=""
+4 FOR
SET I=$ORDER(XOBARR(I))
IF I=""
QUIT
SET XOBRET=XOBRET_XOBARR(I)_":"
+5 SET XOBY=XOBRET
+6 SET X=$$RTRNFMT^XWBLIB("SINGLE VALUE")
+7 QUIT
+8 ;
XS2ARP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH SV2ARR
+1 NEW X
+2 MERGE XOBY=XOBARR
+3 SET X=$$RTRNFMT^XWBLIB("ARRAY",1)
+4 QUIT
+5 ;
XG2SRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH GLB2SV
+1 NEW X,Y,I
+2 SET Y=""
+3 SET I=""
+4 FOR
SET I=$ORDER(XOBARR(I))
IF I=""
QUIT
SET Y=Y_XOBARR(I)_"/"
+5 SET XOBY=Y
+6 SET X=$$RTRNFMT^XWBLIB("SINGLE VALUE")
+7 QUIT
+8 ;
XS2GRP(XOBY,XOBARR) ; -- rpc: XOBV TEST JUNIT SWITCH SV2GLB
+1 NEW X
+2 SET XOBY=$NAME(^TMP("XOB VL TEST",$JOB))
+3 KILL @XOBY
+4 MERGE @XOBY=XOBARR
+5 SET X=$$RTRNFMT^XWBLIB("GLOBAL ARRAY",1)
+6 QUIT
+7 ;
RPCTO(XOBY,XOBTTYP) ; -- rpc: graceful timeout : XOBV TEST JUNIT RPC TIMEOUT
+1 ; -- used to test graceful but not waiting
+2 IF XOBTTYP="NO TIMEOUT CHECK"
SET XOBY=$$NOTOCHK()
QUIT
+3 ; -- used to test timeout reset
+4 IF XOBTTYP="RESET TIMEOUT"
DO RESET()
SET XOBY=$$RESET()
QUIT
+5 ; -- used to test force timeout
+6 IF XOBTTYP="FORCE TIMEOUT"
DO FORCE()
SET XOBY=$$FORCE()
QUIT
+7 QUIT
+8 ;
NOTOCHK() ; -- no timeout check
+1 QUIT "No Timeout Check Return"
+2 ;
RESET() ; -- reset RPC timeout
+1 FOR
HANG 1
IF $$STOP^XOBVLIB()
Begin DoDot:1
+2 NEW TO,I,X
+3 SET TO=$$GETTO^XOBVLIB()
+4 FOR I=2:1
Begin DoDot:2
+5 SET X=$$SETTO^XOBVLIB(TO*I)
+6 SET X=$$STOP^XOBVLIB()
End DoDot:2
IF 'X
QUIT
End DoDot:1
QUIT
+7 QUIT "Reset Timeout Return"
+8 ;
FORCE() ; -- force RPC timeout
+1 FOR
HANG 1
IF $$STOP^XOBVLIB()
QUIT
+2 QUIT "Forced Timeout return"
+3 ;