예제 #1
0
    def run(self):
        while self.op_count > 0:
            try:
                if self.op_type == "random":
                    self.result = Guest.scenarios[get_random_scenario(Guest)]()
                else:
                    self.result = Guest.scenarios[self.op_type]()
                Guest.log.info("%s %s" % (self.tenant_scope, self.result))
            except Exception as e:
                self.exception = e
                traceback.print_exc()
                break
            except Java_base_exception as e:
                self.exception = e
                traceback.print_exc()
                break

            self.op_count -= 1
예제 #2
0
    def run(self):
        while self.op_count > 0:
            try:
                if self.op_type == "random":
                    rand_scenario = get_random_scenario(User)
                    self.result = User.scenarios[rand_scenario](self)
                else:
                    self.result = User.scenarios[self.op_type](self)
                User.log.info("%s %s" % (self.scope, self.result))
            except Exception as e:
                self.exception = e
                traceback.print_exc()
                break
            except Java_base_exception as e:
                self.exception = e
                traceback.print_exc()
                break

            self.op_count -= 1
예제 #3
0
    def run(self):
        while self.op_count > 0:
            try:
                if self.op_type == "random":
                    rand_scenario = get_random_scenario(Hotel)
                    self.result = Hotel.scenarios[rand_scenario](self)
                else:
                    self.result = Hotel.scenarios[self.op_type](self)
                Hotel.log.info(self.result)
            except Exception as e:
                self.exception = e
                traceback.print_exc()
                break
            except Java_base_exception as e:
                self.exception = e
                traceback.print_exc()
                break

            self.op_count -= 1
예제 #4
0
    def run(self):
        while self.op_count > 0:
            try:
                if self.op_type == "random":
                    rand_scenario = get_random_scenario(Airline)
                    self.result = Airline.scenarios[rand_scenario](self)
                else:
                    self.result = Airline.scenarios[self.op_type](self)
                Airline.log.debug("%s %s" % (self.tenant_scope, self.result))
            except Exception as e:
                self.exception = e
                traceback.print_exc()
                break
            except Java_base_exception as e:
                self.exception = e
                traceback.print_exc()
                break

            self.op_count -= 1
예제 #5
0
파일: guest.py 프로젝트: AnithaKuberan/TAF
    def run(self):
        while self.op_count > 0:
            try:
                if self.op_type == "random":
                    self.result = Guest.scenarios[get_random_scenario(Guest)]()
                else:
                    self.result = Guest.scenarios[self.op_type]()
                Guest.log.info(self.result)
            except Exception as e:
                self.exception = e
                traceback.print_exc()
                break
            except IndexFailureException as e:
                self.log.warning(e)
            except Java_base_exception as e:
                self.exception = e
                traceback.print_exc()
                break

            self.op_count -= 1
예제 #6
0
파일: user.py 프로젝트: AnithaKuberan/TAF
    def run(self):
        while self.op_count > 0:
            try:
                if self.op_type == "random":
                    rand_scenario = get_random_scenario(User)
                    self.result = User.scenarios[rand_scenario](self)
                else:
                    self.result = User.scenarios[self.op_type](self)
                User.log.info(self.result)
            except Exception as e:
                self.exception = e
                traceback.print_exc()
                break
            except IndexFailureException as e:
                self.log.warning(e)
            except Java_base_exception as e:
                self.exception = e
                traceback.print_exc()
                break

            self.op_count -= 1