aboutsummaryrefslogtreecommitdiff
path: root/db_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-04 15:30:05 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-05 07:56:13 -0700
commit8b3b81ef47d8eaa1f95e152943fd10b03b782034 (patch)
treeb4facd8b21cba315de943c7946c67f685ee4900a /db_test.go
parentAdd RWTransaction.Delete(). (diff)
downloaddedo-8b3b81ef47d8eaa1f95e152943fd10b03b782034.tar.gz
dedo-8b3b81ef47d8eaa1f95e152943fd10b03b782034.tar.xz
Fix quick tests.
Diffstat (limited to 'db_test.go')
-rw-r--r--db_test.go38
1 files changed, 0 insertions, 38 deletions
diff --git a/db_test.go b/db_test.go
index 224cfc7..565adb8 100644
--- a/db_test.go
+++ b/db_test.go
@@ -1,14 +1,11 @@
package bolt
import (
- "bytes"
- "fmt"
"io"
"io/ioutil"
"os"
"syscall"
"testing"
- "testing/quick"
"time"
"unsafe"
@@ -156,41 +153,6 @@ func TestDBPut(t *testing.T) {
})
}
-// Ensure that a bucket can write random keys and values across multiple txns.
-func TestDBPutRandom(t *testing.T) {
- f := func(items testKeyValuePairs) bool {
- withOpenDB(func(db *DB, path string) {
- db.CreateBucket("widgets")
- for _, item := range items {
- if len(item.Key) == 0 {
- continue
- }
- if err := db.Put("widgets", item.Key, item.Value); err != nil {
- panic("put error: " + err.Error())
- }
- }
- for _, item := range items {
- if len(item.Key) == 0 {
- continue
- }
- value, err := db.Get("widgets", item.Key)
- if err != nil {
- panic("get error: " + err.Error())
- }
- if !bytes.Equal(value, []byte(item.Value)) {
- // db.CopyFile("/tmp/bolt.random.db")
- t.Fatalf("value mismatch:\n%x\n%x", item.Value, value)
- }
- }
- fmt.Fprint(os.Stderr, ".")
- })
- return true
- }
- if err := quick.Check(f, qc()); err != nil {
- t.Error(err)
- }
-}
-
// Ensure that a bucket can delete an existing key.
func TestDBDelete(t *testing.T) {
withOpenDB(func(db *DB, path string) {