File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 17
17
18
18
from confluent_kafka import TopicPartition , IsolationLevel
19
19
from confluent_kafka .admin import ListOffsetsResultInfo , OffsetSpec
20
+ from tests .common import TestUtils
20
21
21
22
22
23
def test_list_offsets (kafka_cluster ):
@@ -65,12 +66,13 @@ def test_list_offsets(kafka_cluster):
65
66
assert isinstance (result , ListOffsetsResultInfo )
66
67
assert (result .offset == 3 )
67
68
68
- requests = {topic_partition : OffsetSpec .max_timestamp ()}
69
- futmap = admin_client .list_offsets (requests , ** kwargs )
70
- for _ , fut in futmap .items ():
71
- result = fut .result ()
72
- assert isinstance (result , ListOffsetsResultInfo )
73
- assert (result .offset == 1 )
69
+ if TestUtils .use_kraft ():
70
+ requests = {topic_partition : OffsetSpec .max_timestamp ()}
71
+ futmap = admin_client .list_offsets (requests , ** kwargs )
72
+ for _ , fut in futmap .items ():
73
+ result = fut .result ()
74
+ assert isinstance (result , ListOffsetsResultInfo )
75
+ assert (result .offset == 1 )
74
76
75
77
requests = {topic_partition : OffsetSpec .for_timestamp (base_timestamp + 150 )}
76
78
futmap = admin_client .list_offsets (requests , ** kwargs )
You can’t perform that action at this time.
0 commit comments