- handle QueryJobs errors in QueryEvents
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 27 Jun 2008 12:43:48 +0000 (12:43 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 27 Jun 2008 12:43:48 +0000 (12:43 +0000)
- adapted unit test

org.glite.lb.server/src/query.c
org.glite.lb.server/test/oneJob.qry
org.glite.lb.server/test/test_query_events.cpp

index 8ec4237..ffb2209 100644 (file)
@@ -100,7 +100,7 @@ int edg_wll_QueryEventsServer(
        i = 0;
        out = calloc(1, sizeof(*out));
 
-       edg_wll_QueryJobsServer(ctx, job_conditions, 0, &jobsfound, &statesfound);
+       if (edg_wll_QueryJobsServer(ctx, job_conditions, 0, &jobsfound, &statesfound)) goto cleanup;
 
        for ( ii = 0; (jobsfound) && (jobsfound[ii]); ii++ ) {
                jobstr = edg_wlc_JobIdUnparse(jobsfound[ii]);
index 9011124..59be576 100644 (file)
@@ -26,3 +26,7 @@ select name,value from long_fields where jobid = 'WrCEKje9QTXFiSOZuPMLtw' and ev
 SELECT DISTINCT j.dg_jobid,j.userid FROM jobs j WHERE (j.jobid='WrCEKje9QTXFiSOZuPMLtw')
 https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw   294de3557d9d00b3d2d8a1e6aab028cf
 
+SELECT e.event,j.userid,j.dg_jobid,e.code,e.prog,e.host,u.cert_subj,e.time_stamp,e.usec,e.level,e.arrived FROM events e,users u,jobs j WHERE j.dg_jobid = 'https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw' AND e.jobid=j.jobid AND e.userid=u.userid AND e.code != 0 AND (j.jobid='WrCEKje9QTXFiSOZuPMLtw')
+0      294de3557d9d00b3d2d8a1e6aab028cf        https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw    17      UserInterface   lhun.ics.muni.cz        anonymous       2003-08-07 11:08:40     432100  8       2003-08-07 11:08:40
+1      294de3557d9d00b3d2d8a1e6aab028cf        https://lhun.ics.muni.cz:4850/WrCEKje9QTXFiSOZuPMLtw    2       NetworkServer   lhun.ics.muni.cz        anonymous       2003-08-07 11:09:05     664600  8       2003-08-07 11:09:05
+
index 5bcea9a..b5d7982 100644 (file)
@@ -152,6 +152,7 @@ int edg_wll_JobStatus(
        int             flags,
        edg_wll_JobStat *stat)
 {
+       edg_wlc_JobIdDup(job,&stat->jobId);
        return 0;
 }