(t *testing.T, topic string, partition int32)
| 200 | } |
| 201 | |
| 202 | func endOffsetForPartition(t *testing.T, topic string, partition int32) int64 { |
| 203 | t.Helper() |
| 204 | config := NewFunctionalTestConfig() |
| 205 | client, err := NewClient(FunctionalTestEnv.KafkaBrokerAddrs, config) |
| 206 | require.NoError(t, err) |
| 207 | defer safeClose(t, client) |
| 208 | |
| 209 | offset, err := client.GetOffset(topic, partition, OffsetNewest) |
| 210 | require.NoError(t, err) |
| 211 | return offset |
| 212 | } |
| 213 | |
| 214 | // TestJavaProducerCompressionRoundTrip tests that messages produced by Kafka's Java |
| 215 | // console producer with various compression codecs can be correctly consumed and |
no test coverage detected