Revision 874f6148 test/py/ganeti.hypervisor.hv_xen_unittest.py

b/test/py/ganeti.hypervisor.hv_xen_unittest.py
555 555
          extra = inst.hvparams[constants.HV_KERNEL_ARGS]
556 556
          self.assertTrue(("extra = '%s'" % extra) in lines)
557 557

  
558
  def _StopInstanceCommand(self, instance_name, force, fail, cmd):
558
  def _StopInstanceCommand(self, instance_name, force, fail, full_cmd):
559
    # Remove the timeout (and its number of seconds) if it's there
560
    if full_cmd[:1][0] == "timeout":
561
      cmd = full_cmd[2:]
562
    else:
563
      cmd = full_cmd
564

  
565
    # Test the actual command
559 566
    if (cmd == [self.CMD, "list"]):
560 567
      output = "Name  ID  Mem  VCPUs  State  Time(s)\n" \
561 568
        "Domain-0  0  1023  1  r-----  142691.0\n" \
......
592 599

  
593 600
        if fail:
594 601
          try:
595
            hv._StopInstance(name, force)
602
            hv._StopInstance(name, force, constants.DEFAULT_SHUTDOWN_TIMEOUT)
596 603
          except errors.HypervisorError, err:
597 604
            self.assertTrue(str(err).startswith("xm list failed"),
598 605
                            msg=str(err))
......
602 609
                           msg=("Configuration was removed when stopping"
603 610
                                " instance failed"))
604 611
        else:
605
          hv._StopInstance(name, force)
612
          hv._StopInstance(name, force, constants.DEFAULT_SHUTDOWN_TIMEOUT)
606 613
          self.assertFalse(os.path.exists(cfgfile))
607 614

  
608 615
  def _MigrateNonRunningInstCmd(self, cmd):

Also available in: Unified diff