Skip to content

Commit

Permalink
upgrade compress package
Browse files Browse the repository at this point in the history
  • Loading branch information
lxzan committed Jan 27, 2024
1 parent 6569c69 commit 26098e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/dolthub/maphash v0.1.0
github.com/klauspost/compress v1.17.5-0.20240119100516-32312d57f3c7
github.com/klauspost/compress v1.17.5
github.com/stretchr/testify v1.8.4
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dolthub/maphash v0.1.0 h1:bsQ7JsF4FkkWyrP3oCnFJgrCUAFbFf3kOl4L/QxPDyQ=
github.com/dolthub/maphash v0.1.0/go.mod h1:gkg4Ch4CdCDu5h6PMriVLawB7koZ+5ijb9puGMV50a4=
github.com/klauspost/compress v1.17.5-0.20240119100516-32312d57f3c7 h1:cBVUjnVhEblq1CXwboJtC3F1lQYutr/4sVsnhLUAgiE=
github.com/klauspost/compress v1.17.5-0.20240119100516-32312d57f3c7/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/compress v1.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E=
github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
Expand Down
13 changes: 10 additions & 3 deletions option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,23 @@ func TestCompressClientOption(t *testing.T) {
t.Run("", func(t *testing.T) {
var option = &ClientOption{
PermessageDeflate: PermessageDeflate{
Enabled: true,
Level: flate.BestCompression,
Threshold: 1024,
Enabled: true,
ServerContextTakeover: true,
ClientContextTakeover: true,
Level: flate.BestCompression,
Threshold: 1024,
},
}
initClientOption(option)

as.Equal(true, option.PermessageDeflate.Enabled)
as.Equal(flate.BestCompression, option.PermessageDeflate.Level)
as.Equal(1024, option.PermessageDeflate.Threshold)
validateClientOption(as, option)

var cfg = option.getConfig()
as.Nil(cfg.cswPool)
as.Nil(cfg.dswPool)
})
}

Expand Down

0 comments on commit 26098e0

Please sign in to comment.