13 A test for an incorrect handling of exceptions from algorithms running in sub-slots
15 Throwing an exception causes the event to be marked as failed.
16 It also means that the part of the code that updates the algorithm state is bypassed.
17 Since the AlgExecStateSvc does not (currently) understand sub-slots,
18 if the exception is thrown by an alg in sub-slot 2, the state for that same alg
19 in sub-slot 1 is retrieved.
21 So, it is possible to have a failed event, without any algorihms in ERROR state.
22 The scheduler does not have handling for this, and hangs.
26 from Configurables
import (
28 AvalancheSchedulerSvc,
31 GaudiTesting__StopLoopAlg,
51 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
59 slimeventloopmgr = HiveSlimEventLoopMgr(
60 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=INFO
70 scheduler = AvalancheSchedulerSvc(
71 ThreadPoolSize=threads, OutputLevel=INFO, VerboseSubSlots=
True
78 AlgResourcePool(OutputLevel=INFO)
84 a1 = Test__ViewTester(
"A1")
85 a1.baseViewName =
"view"
86 a1.viewNumber = viewsPerEvt
87 a1.viewNodeName =
"viewNode"
89 a2 = Test__ViewTester(
"A2")
95 a3 = GaudiTesting__StopLoopAlg(
"A3", EventCount=3, Mode=
"exception")
97 a4 = Test__ViewTester(
"A4")
100 for algo
in [a1, a2, a3, a4]:
101 algo.Cardinality = cardinality
102 algo.OutputLevel = INFO
104 viewNode = Gaudi__Sequencer(
105 "viewNode", Members=[a2, a3], Sequential=
False, ShortCircuit=
False, OutputLevel=INFO
108 createViewSeq = Gaudi__Sequencer(
109 "createViewSeq", Members=[a1, viewNode, a4], Sequential=
True, OutputLevel=INFO
119 EventLoop=slimeventloopmgr,
120 TopAlg=[createViewSeq],
121 MessageSvcType=
"InertMessageSvc",