test with very large keys

This commit is contained in:
Josh Baker 2016-09-08 16:27:28 -07:00
parent a5c10a55f6
commit a49d1ddf15

View File

@ -15,6 +15,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/tidwall/log"
"github.com/tidwall/tile38/controller" "github.com/tidwall/tile38/controller"
) )
@ -69,7 +70,7 @@ func TestServer(t *testing.T) {
var done = make(chan bool, 2) var done = make(chan bool, 2)
var ignoreErrs bool var ignoreErrs bool
go func() { go func() {
// log.Default = log.New(ioutil.Discard, nil) log.Default = log.New(ioutil.Discard, nil)
err := controller.ListenAndServeEx("localhost", port, dir, &ln) err := controller.ListenAndServeEx("localhost", port, dir, &ln)
if err != nil { if err != nil {
if !ignoreErrs { if !ignoreErrs {
@ -188,13 +189,13 @@ func testSet(t *testing.T, jsonSize, keyIDSize, frag int) {
} }
} }
func SubTestSet100KB(t *testing.T) { func SubTestSet100KB(t *testing.T) {
testSet(t, 100*1024, 100, 1024) testSet(t, 100*1024, 5000, 1024)
} }
func SubTestSet1MB(t *testing.T) { func SubTestSet1MB(t *testing.T) {
testSet(t, 1024*1024, 100, 1024) testSet(t, 1024*1024, 5000, 1024)
} }
func SubTestSet10MB(t *testing.T) { func SubTestSet10MB(t *testing.T) {
testSet(t, 10*1024*1024, 100, 1024) testSet(t, 10*1024*1024, 5000, 1024)
} }
func buildCommand(arg ...string) []byte { func buildCommand(arg ...string) []byte {
var b []byte var b []byte