Commit 8249af42 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

Only register event loop once in test suite

Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent f6ae89a1
/*
* This file is part of the libvirt-go project
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Copyright (C) 2018 Red Hat, Inc.
*
*/
package libvirt
func init() {
EventRegisterDefaultImpl()
}
......@@ -32,10 +32,6 @@ import (
"time"
)
func init() {
EventRegisterDefaultImpl()
}
func TestDomainEventRegister(t *testing.T) {
callbackId := -1
......
......@@ -203,7 +203,6 @@ func TestUnregisterCloseCallback(t *testing.T) {
}
func TestSetKeepalive(t *testing.T) {
EventRegisterDefaultImpl() // We need the event loop for keepalive
conn := buildTestQEMUConnection() // The test driver doesn't support keepalives
defer func() {
if res, _ := conn.Close(); res != 0 {
......@@ -1462,7 +1461,7 @@ func TestStorageVolUploadDownloadCallbacks(t *testing.T) {
if sent != len(input) {
t.Fatalf("Wanted %d but only sent %d bytes",
len(input), sent)
len(input), sent)
}
// 4. finish!
......
......@@ -32,10 +32,6 @@ import (
"time"
)
func init() {
EventRegisterDefaultImpl()
}
func TestNetworkEventRegister(t *testing.T) {
if true {
......
......@@ -32,10 +32,6 @@ import (
"time"
)
func init() {
EventRegisterDefaultImpl()
}
func TestNodeDeviceEventRegister(t *testing.T) {
if true {
......
......@@ -32,10 +32,6 @@ import (
"time"
)
func init() {
EventRegisterDefaultImpl()
}
func TestStoragePoolEventRegister(t *testing.T) {
if true {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment