Skip to content

Commit

Permalink
Unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
todor-ivanov committed Feb 4, 2025
1 parent b642888 commit 3032340
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/python/WMCore_t/Services_t/WorkQueue_t/WorkQueue_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ def testWorkQueueService(self):
self.assertEqual(wqApi.getWMBSUrl(), [])
self.assertEqual(wqApi.getWMBSUrlByRequest(), [])

def testGetWQElementsByWorkflow(self):
specName = "RerecoSpec"
specUrl = self.specGenerator.createReRecoSpec(specName, "file",
assignKwargs={'SiteWhitelist':["T2_XX_SiteA"]})
globalQ = globalQueue(DbName='workqueue_t',
QueueURL=self.testInit.couchUrl,
UnittestFlag=True, **self.queueParams)
globalQ.queueWork(specUrl, "RerecoSpec", "teamA")
wqService = WorkQueueDS(self.testInit.couchUrl, 'workqueue_t')

gqList=globalQ.backend.getElementsForWorkflow(specName)
wqSList=wqService.getWQElementsByWorkflow(specName)
self.assertListEqual(gqList, wqSList)

def testUpdatePriorityService(self):
"""
_testUpdatePriorityService_
Expand Down

0 comments on commit 3032340

Please sign in to comment.