File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
src/DIRAC/WorkloadManagementSystem/Agent
tests/Integration/Monitoring Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ def execute(self):
37
37
for record in values :
38
38
record = record [1 :]
39
39
rD = {}
40
+ for iP in range (len (self .__summaryKeyFieldsMapping )):
41
+ rD [self .__summaryKeyFieldsMapping [iP ]] = record [iP ]
40
42
record = record [len (self .__summaryKeyFieldsMapping ) :]
41
43
for iP in range (len (self .__summaryValueFieldsMapping )):
42
44
rD [self .__summaryValueFieldsMapping [iP ]] = int (record [iP ])
Original file line number Diff line number Diff line change 63
63
wmsMonitoringReporter = MonitoringReporter (monitoringType = "WMSHistory" )
64
64
componentMonitoringReporter = MonitoringReporter (monitoringType = "ComponentMonitoring" )
65
65
pilotMonitoringReporter = MonitoringReporter (monitoringType = "PilotSubmissionMonitoring" )
66
-
66
+ pilotsHistoryReporter = MonitoringReporter ( monitoringType = "PilotsHistory" )
67
67
data = [
68
68
{
69
69
"Status" : "Waiting" ,
852
852
},
853
853
]
854
854
855
+ pilotsHistoryData = [
856
+ {
857
+ "TaskQueueID" : "1240451" ,
858
+ "GridSite" : "LCG.CNAF.it" ,
859
+ "GridType" : "" ,
860
+ "Status" : "failed" ,
861
+ "Pilots" : "7" ,
862
+ "timestamp" : 1649161714 ,
863
+ },
864
+ {
865
+ "TaskQueueID" : "12401" ,
866
+ "GridSite" : "LCG.CNAF.it" ,
867
+ "GridType" : "" ,
868
+ "Status" : "failed" ,
869
+ "Pilots" : "7" ,
870
+ "timestamp" : 1649161714 ,
871
+ },
872
+ ]
873
+
855
874
856
875
def test_addWMSRecords ():
857
876
for record in data :
@@ -875,3 +894,11 @@ def test_addPilotSubmissionRecords():
875
894
result = pilotMonitoringReporter .commit ()
876
895
assert result ["OK" ]
877
896
assert result ["Value" ] == len (pilotMonitoringData )
897
+
898
+
899
+ def test_addPilotHistoryRecords ():
900
+ for record in pilotsHistoryData :
901
+ pilotsHistoryReporter .addRecord (record )
902
+ result = pilotsHistoryReporter .commit ()
903
+ assert result ["OK" ]
904
+ assert result ["Value" ] == len (pilotsHistoryData )
You can’t perform that action at this time.
0 commit comments