On Thu, Oct 08, 2015 at 10:17:23AM +0100, Daniel P. Berrange wrote:
On Mon, Oct 05, 2015 at 05:18:42PM -0600, Mike Latimer wrote:
> When testing larger domains, a delay is necessary to ensure the test domain
> is fully initialized before hotplugging disks and/or nics.
>
> Signed-off-by: Mike Latimer <mlatimer(a)suse.com>
> ---
> scripts/domain/200-disk-hotplug.t | 1 +
> scripts/domain/210-nic-hotplug.t | 1 +
> scripts/domain/215-nic-hotplug-many.t | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t
> index 4c54b6b..2edf0c9 100644
> --- a/scripts/domain/200-disk-hotplug.t
> +++ b/scripts/domain/200-disk-hotplug.t
> @@ -46,6 +46,7 @@ my $xml = $tck->generic_domain(name =>
"tck")->as_xml;
> diag "Creating a new transient domain";
> my $dom;
> ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient
domain object");
> +sleep(20);
I'm really not a fan to adding arbitrary 20 second delays to so
many of our tests, as it dramatically increases the running time
of the test suite.
Can you explain more about the actual failure / problem scenario
you are seeing ?
Although we don't use ssh in these tests, perhaps it is reasonable
to also poll on connect() on the ssh port to identify when the SSH
server has started, and use that as an indication that the guest
has booted.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|