MCPcopy
hub / github.com/IBM/sarama / endOffsetForPartition

Function endOffsetForPartition

functional_java_interop_test.go:202–212  ·  view source on GitHub ↗
(t *testing.T, topic string, partition int32)

Source from the content-addressed store, hash-verified

200}
201
202func 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

Calls 5

GetOffsetMethod · 0.95
NewFunctionalTestConfigFunction · 0.85
HelperMethod · 0.80
NewClientFunction · 0.70
safeCloseFunction · 0.70

Tested by

no test coverage detected