Merge pull request #274 from wpedrak/speed-up-short-tests

Skip few long running tests in `-short` mode
pull/223/head^2
Piotr Tabor 2021-04-23 13:50:49 +02:00 committed by GitHub
commit 9c5c4ad0ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -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()

View File

@ -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

View File

@ -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)
}