Skip to content

Commit

Permalink
testing: group (reorder) imports.
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Tabor <ptab@google.com>
  • Loading branch information
ptabor committed Dec 28, 2022
1 parent 615a11c commit 966ae41
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 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
6 changes: 4 additions & 2 deletions internal/btesting/btesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package btesting
import (
"flag"
"fmt"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
"os"
"path/filepath"
"regexp"
"testing"
"time"

"github.com/stretchr/testify/require"

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 966ae41

Please sign in to comment.