Skip to content

Commit

Permalink
testing: group (reorder) imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
ptabor committed Dec 28, 2022
1 parent 615a11c commit 0d4d145
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/binary"
"errors"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"log"
"math/rand"
"os"
Expand All @@ -18,6 +17,7 @@ import (
"github.com/stretchr/testify/require"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

// Ensure that a bucket that gets a non-existent key returns nil.
Expand Down
2 changes: 1 addition & 1 deletion cursor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"encoding/binary"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"log"
"os"
"reflect"
Expand All @@ -13,6 +12,7 @@ import (
"testing/quick"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

// Ensure that a cursor can return a reference to the bucket that created it.
Expand Down
2 changes: 1 addition & 1 deletion db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/binary"
"errors"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"hash/fnv"
"log"
"math/rand"
Expand All @@ -17,6 +16,7 @@ import (
"unsafe"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

// pageSize is the size of one page in the data file.
Expand Down
3 changes: 2 additions & 1 deletion internal/btesting/btesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"flag"
"fmt"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
"os"
"path/filepath"
"regexp"
"testing"
"time"

bolt "go.etcd.io/bbolt"
)

var statsFlag = flag.Bool("stats", false, "show performance stats")
Expand Down
2 changes: 1 addition & 1 deletion simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package bbolt_test
import (
"bytes"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"math/rand"
"sync"
"sync/atomic"
"testing"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) }
Expand Down
2 changes: 1 addition & 1 deletion tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"bytes"
"errors"
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"log"
"os"
"testing"

bolt "go.etcd.io/bbolt"
"go.etcd.io/bbolt/internal/btesting"
)

// TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.
Expand Down
4 changes: 2 additions & 2 deletions unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package bbolt_test

import (
"fmt"
"go.etcd.io/bbolt/internal/btesting"
"golang.org/x/sys/unix"
"testing"

bolt "go.etcd.io/bbolt"
"golang.org/x/sys/unix"
"go.etcd.io/bbolt/internal/btesting"
)

func TestMlock_DbOpen(t *testing.T) {
Expand Down

0 comments on commit 0d4d145

Please sign in to comment.