From 82a7eae2bc774e8ee32ba547900592bba373be7d Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Tue, 6 Aug 2019 23:35:58 +0200 Subject: [PATCH] Removed unused (and skipped) TestGZIPCompression (#858) --- pkg/chunkenc/gzip_test.go | 44 --------------------------------------- 1 file changed, 44 deletions(-) diff --git a/pkg/chunkenc/gzip_test.go b/pkg/chunkenc/gzip_test.go index 5e1363e08b11..458693c88c85 100644 --- a/pkg/chunkenc/gzip_test.go +++ b/pkg/chunkenc/gzip_test.go @@ -2,8 +2,6 @@ package chunkenc import ( "bytes" - "fmt" - "io/ioutil" "math" "math/rand" "sync" @@ -106,48 +104,6 @@ func TestGZIPBlock(t *testing.T) { }) } -func TestGZIPCompression(t *testing.T) { - if testing.Short() { - t.SkipNow() - } - - b, err := ioutil.ReadFile("NASA_access_log_Aug95") - if err != nil { - t.SkipNow() - } - - lines := bytes.Split(b, []byte("\n")) - fmt.Println(len(lines)) - - for _, blockSize := range []int{4 * 1024, 8 * 1024, 16 * 1024, 32 * 1024, 64 * 1024, 128 * 1024, 256 * 1024, 512 * 1024} { - testName := fmt.Sprintf("%d", blockSize/1024) - t.Run(testName, func(t *testing.T) { - chk := NewMemChunk(EncGZIP) - chk.blockSize = blockSize - - for i, l := range lines { - require.NoError(t, chk.Append(logprotoEntry(int64(i), string(l)))) - } - - b2, err := chk.Bytes() - require.NoError(t, err) - fmt.Println(float64(len(b))/(1024*1024), float64(len(b2))/(1024*1024), float64(len(b2))/float64(len(chk.blocks))) - - it, err := chk.Iterator(time.Unix(0, 0), time.Unix(0, math.MaxInt64), logproto.FORWARD, nil) - require.NoError(t, err) - - for i, l := range lines { - require.True(t, it.Next()) - - e := it.Entry() - require.Equal(t, int64(i), e.Timestamp.UnixNano()) - require.Equal(t, string(l), e.Line) - } - require.NoError(t, it.Error()) - }) - } -} - func TestGZIPSerialisation(t *testing.T) { chk := NewMemChunk(EncGZIP)