MCPcopy Index your code
hub / github.com/cortexproject/cortex / TestExpandedPostingsCacheFuzz

Function TestExpandedPostingsCacheFuzz

integration/query_fuzz_test.go:424–662  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

422}
423
424func TestExpandedPostingsCacheFuzz(t *testing.T) {
425 stableCortexImage := "quay.io/cortexproject/cortex:v1.18.0"
426 s, err := e2e.NewScenario(networkName)
427 require.NoError(t, err)
428 defer s.Close()
429
430 // Start dependencies.
431 consul1 := e2edb.NewConsulWithName("consul1")
432 consul2 := e2edb.NewConsulWithName("consul2")
433 require.NoError(t, s.StartAndWaitReady(consul1, consul2))
434
435 flags1 := mergeFlags(
436 AlertmanagerLocalFlags(),
437 map[string]string{
438 "-store.engine": blocksStorageEngine,
439 "-blocks-storage.backend": "filesystem",
440 "-blocks-storage.tsdb.head-compaction-interval": "4m",
441 "-blocks-storage.tsdb.block-ranges-period": "2h",
442 "-blocks-storage.tsdb.ship-interval": "1h",
443 "-blocks-storage.bucket-store.sync-interval": "15m",
444 "-blocks-storage.tsdb.retention-period": "2h",
445 "-blocks-storage.bucket-store.index-cache.backend": tsdb.IndexCacheBackendInMemory,
446 "-blocks-storage.bucket-store.bucket-index.enabled": "true",
447 // Ingester.
448 "-ring.store": "consul",
449 "-consul.hostname": consul1.NetworkHTTPEndpoint(),
450 // Distributor.
451 "-distributor.replication-factor": "1",
452 // Store-gateway.
453 "-store-gateway.sharding-enabled": "false",
454 // alert manager
455 "-alertmanager.web.external-url": "http://localhost/alertmanager",
456 },
457 )
458 flags2 := mergeFlags(
459 AlertmanagerLocalFlags(),
460 map[string]string{
461 "-store.engine": blocksStorageEngine,
462 "-blocks-storage.backend": "filesystem",
463 "-blocks-storage.tsdb.head-compaction-interval": "4m",
464 "-blocks-storage.tsdb.block-ranges-period": "2h",
465 "-blocks-storage.tsdb.ship-interval": "1h",
466 "-blocks-storage.bucket-store.sync-interval": "15m",
467 "-blocks-storage.tsdb.retention-period": "2h",
468 "-blocks-storage.bucket-store.index-cache.backend": tsdb.IndexCacheBackendInMemory,
469 "-blocks-storage.bucket-store.bucket-index.enabled": "true",
470 "-blocks-storage.expanded_postings_cache.head.enabled": "true",
471 "-blocks-storage.expanded_postings_cache.block.enabled": "true",
472 // Ingester.
473 "-ring.store": "consul",
474 "-consul.hostname": consul2.NetworkHTTPEndpoint(),
475 "-ingester.matchers-cache-max-items": "10000",
476 // Distributor.
477 "-distributor.replication-factor": "1",
478 // Store-gateway.
479 "-store-gateway.sharding-enabled": "false",
480 // alert manager
481 "-alertmanager.web.external-url": "http://localhost/alertmanager",

Callers

nothing calls this directly

Calls 15

CloseMethod · 0.95
StartAndWaitReadyMethod · 0.95
SharedDirMethod · 0.95
QueryMethod · 0.95
QueryRangeMethod · 0.95
SeriesMethod · 0.95
NewScenarioFunction · 0.92
NewSingleBinaryFunction · 0.92
EqualsFunction · 0.92
NewClientFunction · 0.92
writeFileToSharedDirFunction · 0.85

Tested by

no test coverage detected