Skip to content

Commit

Permalink
Merge pull request #274 from wpedrak/speed-up-short-tests
Browse files Browse the repository at this point in the history
Skip few long running tests in `-short` mode
  • Loading branch information
ptabor authored Apr 23, 2021
2 parents 116fbcd + c691654 commit 9c5c4ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,10 @@ func TestBucket_Put_ValueTooLarge(t *testing.T) {

// Ensure a bucket can calculate stats.
func TestBucket_Stats(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}

db := MustOpenDB()
defer db.MustClose()

Expand Down
4 changes: 4 additions & 0 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ func TestOpen(t *testing.T) {
// Regression validation for https://github.com/etcd-io/bbolt/pull/122.
// Tests multiple goroutines simultaneously opening a database.
func TestOpen_MultipleGoroutines(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}

const (
instances = 30
iterations = 30
Expand Down
4 changes: 4 additions & 0 deletions manydbs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func createAndPutKeys(t *testing.T) {
}

func TestManyDBs(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}

for i := 0; i < 100; i++ {
t.Run(fmt.Sprintf("%d", i), createAndPutKeys)
}
Expand Down

0 comments on commit 9c5c4ad

Please sign in to comment.