Пример #1
0
    def testE(self):
        try:
         JobState.register("jobClassID5","Processing",2,2,"myWorkflowID")
         JobState.create("jobClassID5","cacheDir/location/5somewhere")
         JobState.inProgress("jobClassID5")
         JobState.submit("jobClassID5")

        # now introduce some failures until we have more failures
        # then retries (this raises an error)

         JobState.runFailure("jobClassID5","jobInstanceID5.1",
              "some.location5.1","job/Report/Location5.1.xml")
         try:
              JobState.runFailure("jobClassID5","jobInstanceID5.2",
                   "some.location5.1","job/Report/Location5.1.xml")
         except ProdException, ex:
              print('>>>Test succeeded for exception 1/1 in testE of JobState_t.py\n')
         JobState.finished("jobClassID5")
Пример #2
0

         JobState.runFailure("jobClassID4","jobInstanceID4.1",
              "some.location4.1","job/Report/Location4.1.xml")
         # retries=2, racers=0
         JobState.submit("jobClassID4")
         # retries=2, racers=1
         JobState.submit("jobClassID4")
         # retries=2, racers=2
         JobState.runFailure("jobClassID4","jobInstanceID4.2",
              "some.location4.2","job/Report/Location4.2.xml")
         # retries=3, racers=1
         JobState.submit("jobClassID4")
         # retries=3, racers=2
         self.assertEqual(JobState.general("jobClassID4"),{'Retries': 3L, 'CacheDirLocation': 'cacheDir/location/4somewhere', 'MaxRacers': 2L, 'Racers': 2L, 'State': 'inProgress', 'MaxRetries': 6L, 'JobType': 'Processing'})
         JobState.finished("jobClassID4")
         self.assertEqual(JobState.general("jobClassID4"),{'Retries': 3L, 'CacheDirLocation': 'cacheDir/location/4somewhere', 'MaxRacers': 2L, 'Racers': 2L, 'State': 'finished', 'MaxRetries': 6L, 'JobType': 'Processing'})
        except StandardError, ex:
            msg = "Failed State Change TestD:\n"
            msg += str(ex)
            self.fail(msg)

    def testE(self):
        try:
         JobState.register("jobClassID5","Processing",2,2,"myWorkflowID")
         JobState.create("jobClassID5","cacheDir/location/5somewhere")
         JobState.inProgress("jobClassID5")
         JobState.submit("jobClassID5")

        # now introduce some failures until we have more failures
        # then retries (this raises an error)