(t testing.TB, address string, assignedPartitions []int32)
| 916 | } |
| 917 | |
| 918 | func blockbuilderConfig(t testing.TB, address string, assignedPartitions []int32) Config { |
| 919 | cfg := Config{} |
| 920 | flagext.DefaultValues(&cfg) |
| 921 | |
| 922 | flagext.DefaultValues(&cfg.BlockConfig) |
| 923 | |
| 924 | cfg.BlockConfig.BlockConfig.RegisterFlagsAndApplyDefaults("", &flag.FlagSet{}) |
| 925 | cfg.BlockConfig.Version = encoding.DefaultEncoding().Version() |
| 926 | |
| 927 | flagext.DefaultValues(&cfg.IngestStorageConfig.Kafka) |
| 928 | cfg.IngestStorageConfig.Kafka.Address = address |
| 929 | cfg.IngestStorageConfig.Kafka.Topic = testTopic |
| 930 | cfg.IngestStorageConfig.Kafka.ConsumerGroup = testConsumerGroup |
| 931 | cfg.AssignedPartitionsMap = map[string][]int32{cfg.InstanceID: assignedPartitions} |
| 932 | |
| 933 | cfg.ConsumeCycleDuration = 5 * time.Second |
| 934 | |
| 935 | cfg.WAL.Filepath = t.TempDir() |
| 936 | |
| 937 | return cfg |
| 938 | } |
| 939 | |
| 940 | var _ blocklist.JobSharder = (*ownEverythingSharder)(nil) |
| 941 |
no test coverage detected