Merge pull request #3383 from cognusion/fixes2

Test Fixes: Take 2
release-2.2
Yicheng Qin 2015-08-27 13:22:19 -07:00
commit 4ac4648b5b
3 changed files with 3 additions and 2 deletions

View File

@ -117,6 +117,7 @@ func TestCORSHandler(t *testing.T) {
}
// it is set by http package, and there is no need to test it
rr.HeaderMap.Del("Content-Type")
rr.HeaderMap.Del("X-Content-Type-Options")
if !reflect.DeepEqual(rr.HeaderMap, tt.wheader) {
t.Errorf("#%d: header = %+v, want %+v", i, rr.HeaderMap, tt.wheader)
}

View File

@ -52,7 +52,7 @@ func TestNetworkDelay(t *testing.T) {
w := time.Duration(float64(sent)*delayrate/2) * delay
// there are pretty overhead in the send call, since it genarete random numbers.
if total < w+10*delay {
if total < w {
t.Errorf("total = %v, want > %v", total, w)
}
}

View File

@ -20,7 +20,7 @@ func TestBackendPut(t *testing.T) {
batchTx.UnsafeCreateBucket([]byte("test"))
batchTx.UnsafePut([]byte("test"), []byte("foo"), v)
gv := batchTx.UnsafeRange([]byte("test"), v, nil, -1)
_, gv := batchTx.UnsafeRange([]byte("test"), v, nil, -1)
if !reflect.DeepEqual(gv[0], v) {
t.Errorf("v = %s, want %s", string(gv[0]), string(v))
}