def run(self): exit_code = 0 sender_command = [ "quiver-arrow", "send", self.url, "--impl", self.sender_impl, "--verbose" ] sender_command += self.sender_options receiver_command = [ "quiver-arrow", "receive", self.url, "--impl", self.receiver_impl, "--verbose" ] receiver_command += self.receiver_options senders = list() receivers = list() for i in range(self.receiver_count): receiver = _plano.start_process(receiver_command) receivers.append(receiver) _plano.wait_for_port(self.port) for i in range(self.sender_count): sender = _plano.start_process(sender_command) senders.append(sender) try: try: for sender in senders: _plano.wait_for_process(sender) for receiver in receivers: _plano.wait_for_process(receiver) except: for sender in senders: _plano.stop_process(sender) for receiver in receivers: _plano.stop_process(receiver) raise for sender in senders: if sender.returncode != 0: exit_code = 1 break for receiver in receivers: if receiver.returncode != 0: exit_code = 1 break except KeyboardInterrupt: pass except: _traceback.print_exc() exit_code = 1 finally: _plano.exit(exit_code)
def run(self): if self.client_server: for sender_impl in self.sender_impls: for receiver_impl in self.receiver_impls: if not self.mixed_pairs: if sender_impl != receiver_impl: continue if sender_impl in OPENWIRE_ARROW_IMPLS: if receiver_impl not in OPENWIRE_ARROW_IMPLS: continue if receiver_impl in OPENWIRE_ARROW_IMPLS: if sender_impl not in OPENWIRE_ARROW_IMPLS: continue if sender_impl in CORE_PROTOCOL_ARROW_IMPLS: if receiver_impl not in CORE_PROTOCOL_ARROW_IMPLS: continue if receiver_impl in CORE_PROTOCOL_ARROW_IMPLS: if sender_impl not in CORE_PROTOCOL_ARROW_IMPLS: continue for server_impl in self.server_impls: if sender_impl in OPENWIRE_ARROW_IMPLS: if server_impl not in OPENWIRE_SERVER_IMPLS: continue if sender_impl in CORE_PROTOCOL_ARROW_IMPLS: if server_impl not in CORE_PROTOCOL_SERVER_IMPLS: continue self.run_test(sender_impl, server_impl, receiver_impl) if self.peer_to_peer: for sender_impl in self.sender_impls: if sender_impl in OPENWIRE_ARROW_IMPLS: continue if sender_impl in CORE_PROTOCOL_ARROW_IMPLS: continue for receiver_impl in self.receiver_impls: if not self.mixed_pairs: if sender_impl != receiver_impl: continue if receiver_impl not in PEER_TO_PEER_ARROW_IMPLS: continue self.run_test(sender_impl, None, receiver_impl) print("Test failures: {}".format(len(self.failures))) for failure in self.failures: print(failure) # Need summary if len(self.failures) > 0: _plano.exit(1)
def run(self): if self.client_server: for sender_impl in self.sender_impls: for receiver_impl in self.receiver_impls: if not self.mixed_pairs and sender_impl != receiver_impl: continue if sender_impl in OPENWIRE_ARROW_IMPLS: if receiver_impl not in OPENWIRE_ARROW_IMPLS: continue if receiver_impl in OPENWIRE_ARROW_IMPLS: if sender_impl not in OPENWIRE_ARROW_IMPLS: continue if sender_impl in CORE_PROTOCOL_ARROW_IMPLS: if receiver_impl not in CORE_PROTOCOL_ARROW_IMPLS: continue if receiver_impl in CORE_PROTOCOL_ARROW_IMPLS: if sender_impl not in CORE_PROTOCOL_ARROW_IMPLS: continue for server_impl in self.server_impls: if sender_impl in OPENWIRE_ARROW_IMPLS: if server_impl not in OPENWIRE_SERVER_IMPLS: continue if sender_impl in CORE_PROTOCOL_ARROW_IMPLS: if server_impl not in CORE_PROTOCOL_SERVER_IMPLS: continue self.run_test(sender_impl, server_impl, receiver_impl) if self.peer_to_peer: for sender_impl in self.sender_impls: if sender_impl in OPENWIRE_ARROW_IMPLS: continue if sender_impl in CORE_PROTOCOL_ARROW_IMPLS: continue for receiver_impl in self.receiver_impls: if not self.mixed_pairs: if sender_impl != receiver_impl: continue if receiver_impl not in PEER_TO_PEER_ARROW_IMPLS: continue self.run_test(sender_impl, None, receiver_impl) print("Test failures: {}".format(len(self.failures))) for failure in self.failures: print(failure) # Need summary if len(self.failures) > 0: _plano.exit(1)
def init(self): super(GhostCommand, self).init() if self.args.user is None: _plano.exit("No user name") if "func" not in self.args: _plano.exit("Missing subcommand")
def run(self): exit_code = 0 sender_command = ["quiver-arrow", "send", self.url, "--impl", self.sender_impl, "--verbose"] sender_command += self.sender_options receiver_command = ["quiver-arrow", "receive", self.url, "--impl", self.receiver_impl, "--verbose"] receiver_command += self.receiver_options senders = list() receivers = list() for i in range(self.receiver_count): receiver = _plano.start_process(receiver_command) receivers.append(receiver) _plano.wait_for_port(self.port) for i in range(self.sender_count): sender = _plano.start_process(sender_command) senders.append(sender) try: try: for sender in senders: _plano.wait_for_process(sender) for receiver in receivers: _plano.wait_for_process(receiver) except: for sender in senders: _plano.stop_process(sender) for receiver in receivers: _plano.stop_process(receiver) raise for sender in senders: if sender.returncode != 0: exit_code = 1 break for receiver in receivers: if receiver.returncode != 0: exit_code = 1 break except KeyboardInterrupt: pass except: _traceback.print_exc() exit_code = 1 finally: _plano.exit(exit_code)
def main(self): try: self.init() if self.init_only: return self.run() except CommandError as e: _plano.exit(str(e)) except KeyboardInterrupt: pass
def run(self): args = [ self.url, "--messages", self.args.messages, "--body-size", self.args.body_size, "--credit", self.args.credit, "--transaction-size", self.args.transaction_size, "--timeout", self.args.timeout, "--output", self.output_dir, ] if self.durable: args += ["--durable"] if self.quiet: args += ["--quiet"] if self.verbose: args += ["--verbose"] sender_args = ["quiver-arrow", "send", "--impl", self.sender_impl.name] + args receiver_args = ["quiver-arrow", "receive", "--impl", self.receiver_impl.name] + args if self.peer_to_peer: receiver_args += ["--server", "--passive"] self.start_time = now() receiver = _plano.start_process(receiver_args) if self.peer_to_peer: _plano.wait_for_port(self.port, host=self.host) sender = _plano.start_process(sender_args) try: if not self.quiet: self.print_status(sender, receiver) _plano.wait_for_process(sender) _plano.wait_for_process(receiver) except: _plano.stop_process(sender) _plano.stop_process(receiver) raise if (sender.returncode, receiver.returncode) != (0, 0): _plano.exit(1) if not self.quiet: self.print_summary()
def run(self): args = list() if self.duration == 0: args += ["--count", self.args.count] else: args += ["--duration", self.args.duration] args += [ "--body-size", self.args.body_size, "--credit", self.args.credit, "--transaction-size", self.args.transaction_size, "--timeout", self.args.timeout, ] if self.durable: args += ["--durable"] if self.quiet: args += ["--quiet"] if self.verbose: args += ["--verbose"] if self.username: args.append("username={}".format(self.username)) if self.password: args.append("password={}".format(self.password)) if self.args.cert and self.args.key: args += ["--key", self.args.key] args += ["--cert", self.args.cert] args += ["--output", self.output_dir] sender_args = [ "quiver-arrow", "send", self.url, "--impl", self.sender_impl.name ] + args receiver_args = [ "quiver-arrow", "receive", self.url, "--impl", self.receiver_impl.name ] + args if self.peer_to_peer: receiver_args += ["--server", "--passive"] self.start_time = now() #_os.environ["DEBUG"] = "*" receiver = _plano.start_process(receiver_args) #del _os.environ["DEBUG"] if self.peer_to_peer: _plano.wait_for_port(self.port, host=self.host) #_os.environ["PN_TRACE_FRM"] = "1" sender = _plano.start_process(sender_args) #del _os.environ["PN_TRACE_FRM"] try: if not self.quiet: self.print_status(sender, receiver) _plano.check_process(receiver) _plano.check_process(sender) except _plano.CalledProcessError as e: _plano.error(e) finally: _plano.stop_process(sender) _plano.stop_process(receiver) if (sender.returncode, receiver.returncode) != (0, 0): _plano.exit(1) if not self.quiet: self.print_summary()
def init(self): super(EquipageCommand, self).init() if "func" not in self.args: _plano.exit("Missing subcommand")
def run(self): args = list() if self.duration == 0: args += ["--count", self.args.count] else: args += ["--duration", self.args.duration] args += [ "--body-size", self.args.body_size, "--credit", self.args.credit, "--transaction-size", self.args.transaction_size, "--timeout", self.args.timeout, ] if self.durable: args += ["--durable"] if self.quiet: args += ["--quiet"] if self.verbose: args += ["--verbose"] if self.args.cert and self.args.key: args += ["--key", self.args.key] args += ["--cert", self.args.cert] args += ["--output", self.output_dir] sender_args = ["quiver-arrow", "send", self.url, "--impl", self.sender_impl.name] + args receiver_args = ["quiver-arrow", "receive", self.url, "--impl", self.receiver_impl.name] + args if self.peer_to_peer: receiver_args += ["--server", "--passive"] self.start_time = now() #_os.environ["DEBUG"] = "*" receiver = _plano.start_process(receiver_args) #del _os.environ["DEBUG"] if self.peer_to_peer: _plano.wait_for_port(self.port, host=self.host) #_os.environ["PN_TRACE_FRM"] = "1" sender = _plano.start_process(sender_args) #del _os.environ["PN_TRACE_FRM"] try: if not self.quiet: self.print_status(sender, receiver) _plano.check_process(receiver) _plano.check_process(sender) except _plano.CalledProcessError as e: _plano.error(e) finally: _plano.stop_process(sender) _plano.stop_process(receiver) if (sender.returncode, receiver.returncode) != (0, 0): _plano.exit(1) if not self.quiet: self.print_summary()