This is an automated email from the ASF dual-hosted git repository.

tew pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go.git


The following commit(s) were added to refs/heads/master by this push:
     new b818a65c Fix: Unable to return the correct type for Zip compression 
(#1013)
b818a65c is described below

commit b818a65c0865a39799dfd10f64b86db8bf69a9e9
Author: xuzifu666 <[email protected]>
AuthorDate: Sat Dec 6 02:43:44 2025 +0800

    Fix: Unable to return the correct type for Zip compression (#1013)
---
 pkg/compressor/zip_compress.go      | 2 +-
 pkg/compressor/zip_compress_test.go | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/compressor/zip_compress.go b/pkg/compressor/zip_compress.go
index b33a1d6e..f7836b26 100644
--- a/pkg/compressor/zip_compress.go
+++ b/pkg/compressor/zip_compress.go
@@ -55,5 +55,5 @@ func (z Zip) Decompress(data []byte) ([]byte, error) {
 }
 
 func (z Zip) GetCompressorType() CompressorType {
-       return CompressorZstd
+       return CompressorZip
 }
diff --git a/pkg/compressor/zip_compress_test.go 
b/pkg/compressor/zip_compress_test.go
index d9166303..5c4fe084 100644
--- a/pkg/compressor/zip_compress_test.go
+++ b/pkg/compressor/zip_compress_test.go
@@ -32,6 +32,8 @@ func TestZipCompress(t *testing.T) {
        assert.NoError(t, err)
        t.Logf("compress res: %v", string(compressRes))
 
+       assert.EqualValues(t, CompressorZip, g.GetCompressorType())
+
        decompressRes, err := g.Decompress(compressRes)
        assert.NoError(t, err)
        t.Logf("decompress res: %v", string(decompressRes))


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to