Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: disable any -race test that fails or times out #3806

Merged
merged 2 commits into from Nov 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions cmd/jujud/agent/machine_test.go
Expand Up @@ -12,7 +12,6 @@ import (
"runtime"
"strings"
"sync/atomic"
"testing"
"time"

"github.com/juju/cmd"
Expand Down Expand Up @@ -95,12 +94,6 @@ var (
_ = gc.Suite(&mongoSuite{})
)

func TestPackage(t *testing.T) {
// TODO(waigani) 2014-03-19 bug 1294458
// Refactor to use base suites
coretesting.MgoTestPackage(t)
}

type commonMachineSuite struct {
singularRecord *singularRunnerRecord
lxctesting.TestSuite
Expand Down
21 changes: 21 additions & 0 deletions cmd/jujud/agent/package_test.go
@@ -0,0 +1,21 @@
// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package agent_test

import (
stdtesting "testing"

"github.com/juju/testing"

coretesting "github.com/juju/juju/testing"
)

func TestPackage(t *stdtesting.T) {
if testing.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519133, 1519097")
}
// TODO(waigani) 2014-03-19 bug 1294458
// Refactor to use base suites
coretesting.MgoTestPackage(t)
}
9 changes: 7 additions & 2 deletions provider/ec2/suite_test.go → provider/ec2/package_test.go
Expand Up @@ -5,14 +5,19 @@ package ec2_test

import (
"flag"
"testing"
stdtesting "testing"

"github.com/juju/testing"

gc "gopkg.in/check.v1"
)

var amazon = flag.Bool("amazon", false, "Also run some tests on live Amazon servers")

func TestEC2(t *testing.T) {
func TestPackage(t *stdtesting.T) {
if testing.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519141")
}
if *amazon {
registerAmazonTests()
}
Expand Down
8 changes: 0 additions & 8 deletions state/conn_test.go
Expand Up @@ -4,22 +4,14 @@
package state_test

import (
stdtesting "testing"

"github.com/juju/names"
gc "gopkg.in/check.v1"
"gopkg.in/mgo.v2"

"github.com/juju/juju/state"
statetesting "github.com/juju/juju/state/testing"
"github.com/juju/juju/testing"
)

// TestPackage integrates the tests into gotest.
func TestPackage(t *stdtesting.T) {
testing.MgoTestPackage(t)
}

// ConnSuite provides the infrastructure for all other
// test suites (StateSuite, CharmSuite, MachineSuite, etc).
type ConnSuite struct {
Expand Down
19 changes: 19 additions & 0 deletions state/package_test.go
@@ -0,0 +1,19 @@
// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package state

import (
stdtesting "testing"

"github.com/juju/testing"

coretesting "github.com/juju/juju/testing"
)

func TestPackage(t *stdtesting.T) {
if testing.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519095")
}
coretesting.MgoTestPackage(t)
}
5 changes: 5 additions & 0 deletions worker/envworkermanager/envworkermanager_test.go
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/names"
jujutesting "github.com/juju/testing"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"launchpad.net/tomb"
Expand All @@ -24,6 +25,10 @@ import (
)

func TestPackage(t *stdtesting.T) {
if jujutesting.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519144")
}

testing.MgoTestPackage(t)
}

Expand Down
11 changes: 7 additions & 4 deletions worker/machiner/machiner_test.go
Expand Up @@ -27,6 +27,13 @@ import (
"github.com/juju/juju/worker/machiner"
)

func TestPackage(t *stdtesting.T) {
if gitjujutesting.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519145")
}
coretesting.MgoTestPackage(t)
}

type MachinerSuite struct {
coretesting.BaseSuite
accessor *mockMachineAccessor
Expand Down Expand Up @@ -249,10 +256,6 @@ func (s *MachinerSuite) TestMachinerStorageAttached(c *gc.C) {
// unless they fail.
const worstCase = 5 * time.Second

func TestPackage(t *stdtesting.T) {
coretesting.MgoTestPackage(t)
}

type MachinerStateSuite struct {
testing.JujuConnSuite

Expand Down
11 changes: 8 additions & 3 deletions worker/provisioner/package_test.go
Expand Up @@ -6,9 +6,14 @@ package provisioner_test
import (
stdtesting "testing"

"github.com/juju/juju/testing"
"github.com/juju/testing"

coretesting "github.com/juju/juju/testing"
)

func Test(t *stdtesting.T) {
testing.MgoTestPackage(t)
func TestPackage(t *stdtesting.T) {
if testing.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519097")
}
coretesting.MgoTestPackage(t)
}
3 changes: 3 additions & 0 deletions worker/rsyslog/rsyslog_common_test.go
Expand Up @@ -26,6 +26,9 @@ import (
)

func TestPackage(t *stdtesting.T) {
if testing.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519147")
}
coretesting.MgoTestPackage(t)
}

Expand Down
5 changes: 5 additions & 0 deletions worker/uniter/package_test.go
Expand Up @@ -6,9 +6,14 @@ package uniter_test
import (
stdtesting "testing"

"github.com/juju/testing"

coretesting "github.com/juju/juju/testing"
)

func TestPackage(t *stdtesting.T) {
if testing.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519097")
}
coretesting.MgoTestPackage(t)
}
8 changes: 6 additions & 2 deletions worker/uniter/remotestate/package_test.go
Expand Up @@ -4,11 +4,15 @@
package remotestate_test

import (
stdtesting "testing"
"testing"

jujutesting "github.com/juju/testing"
gc "gopkg.in/check.v1"
)

func TestPackage(t *stdtesting.T) {
func TestPackage(t *testing.T) {
if jujutesting.RaceEnabled {
t.Skip("skipping package under -race, see LP 1519149")
}
gc.TestingT(t)
}