mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6350 from nekto0n/fix_message_limit
rafthttp: fix misprint in readBytesLimit value
This commit is contained in:
commit
1ebeef5cbf
@ -43,7 +43,7 @@ type messageDecoder struct {
|
||||
}
|
||||
|
||||
var (
|
||||
readBytesLimit uint64 = 512 * 1024 // 512 MB
|
||||
readBytesLimit uint64 = 512 * 1024 * 1024 // 512 MB
|
||||
ErrExceedSizeLimit = errors.New("rafthttp: error limit exceeded")
|
||||
)
|
||||
|
||||
|
@ -23,6 +23,12 @@ import (
|
||||
)
|
||||
|
||||
func TestMessage(t *testing.T) {
|
||||
// Lower readBytesLimit to make test pass in restricted resources environment
|
||||
originalLimit := readBytesLimit
|
||||
readBytesLimit = 1000
|
||||
defer func() {
|
||||
readBytesLimit = originalLimit
|
||||
}()
|
||||
tests := []struct {
|
||||
msg raftpb.Message
|
||||
encodeErr error
|
||||
|
Loading…
x
Reference in New Issue
Block a user