Skip to content

Commit

Permalink
e2e/store: fix flaky limits test
Browse files Browse the repository at this point in the history
Intentionally disable the default in-memory cache to get consistent
values during the test.

Signed-off-by: Giedrius Statkevičius <[email protected]>
  • Loading branch information
GiedriusS committed Mar 8, 2023
1 parent dabbeda commit de1fab7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/e2e/store_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,11 @@ metafile_content_ttl: 0s`
func TestStoreGatewayBytesLimit(t *testing.T) {
t.Parallel()

const cacheCfg = `type: IN-MEMORY
config:
max_size: 2B
max_item_size: 1B`

e, err := e2e.NewDockerEnvironment("store-limit")
testutil.Ok(t, err)
t.Cleanup(e2ethanos.CleanScenario(t, e))
Expand All @@ -789,7 +794,7 @@ func TestStoreGatewayBytesLimit(t *testing.T) {
Type: client.S3,
Config: e2ethanos.NewS3Config(bucket, m.InternalEndpoint("http"), m.InternalDir()),
},
"",
string(cacheCfg),
[]string{"--store.grpc.downloaded-bytes-limit=1B"},
)

Expand All @@ -800,7 +805,7 @@ func TestStoreGatewayBytesLimit(t *testing.T) {
Type: client.S3,
Config: e2ethanos.NewS3Config(bucket, m.InternalEndpoint("http"), m.InternalDir()),
},
"",
string(cacheCfg),
[]string{"--store.grpc.downloaded-bytes-limit=100B"},
)
store3 := e2ethanos.NewStoreGW(
Expand All @@ -810,7 +815,7 @@ func TestStoreGatewayBytesLimit(t *testing.T) {
Type: client.S3,
Config: e2ethanos.NewS3Config(bucket, m.InternalEndpoint("http"), m.InternalDir()),
},
"",
string(cacheCfg),
[]string{"--store.grpc.downloaded-bytes-limit=196627B"},
)

Expand Down

0 comments on commit de1fab7

Please sign in to comment.