@@ -52,7 +52,7 @@ protected void cleanup() throws Exception {
52
52
}
53
53
54
54
@ Test
55
- public void testInfiniteHttpCallGetSubscriptions () throws Exception {
55
+ public void testInfiniteHttpCallGetOrCreateSubscriptions () throws Exception {
56
56
final String randomStr = UUID .randomUUID ().toString ().replaceAll ("-" , "" );
57
57
final String partitionedTopicName = "persistent://my-property/my-ns/tp1_" + randomStr ;
58
58
final String topic_p0 = partitionedTopicName + TopicName .PARTITIONED_TOPIC_SUFFIX + "0" ;
@@ -64,6 +64,7 @@ public void testInfiniteHttpCallGetSubscriptions() throws Exception {
64
64
// Do test.
65
65
ProducerAndConsumerEntry pcEntry = triggerDLQCreated (topic_p0 , topicDLQ , subscriptionName );
66
66
admin .topics ().getSubscriptions (topicDLQ );
67
+ admin .topics ().createSubscription (topicDLQ , "s1" , MessageId .earliest );
67
68
68
69
// cleanup.
69
70
pcEntry .consumer .close ();
@@ -72,7 +73,7 @@ public void testInfiniteHttpCallGetSubscriptions() throws Exception {
72
73
}
73
74
74
75
@ Test
75
- public void testInfiniteHttpCallGetSubscriptions2 () throws Exception {
76
+ public void testInfiniteHttpCallGetOrCreateSubscriptions2 () throws Exception {
76
77
final String randomStr = UUID .randomUUID ().toString ().replaceAll ("-" , "" );
77
78
final String topicName = "persistent://my-property/my-ns/tp1_" + randomStr + "-partition-0-abc" ;
78
79
Producer <String > producer = pulsarClient .newProducer (Schema .STRING )
@@ -81,13 +82,14 @@ public void testInfiniteHttpCallGetSubscriptions2() throws Exception {
81
82
82
83
// Do test.
83
84
admin .topics ().getSubscriptions (topicName );
85
+ admin .topics ().createSubscription (topicName , "s1" , MessageId .earliest );
84
86
85
87
// cleanup.
86
88
producer .close ();
87
89
}
88
90
89
91
@ Test
90
- public void testInfiniteHttpCallGetSubscriptions3 () throws Exception {
92
+ public void testInfiniteHttpCallGetOrCreateSubscriptions3 () throws Exception {
91
93
final String randomStr = UUID .randomUUID ().toString ().replaceAll ("-" , "" );
92
94
final String topicName = "persistent://my-property/my-ns/tp1_" + randomStr + "-partition-0" ;
93
95
Producer <String > producer = pulsarClient .newProducer (Schema .STRING )
@@ -96,6 +98,7 @@ public void testInfiniteHttpCallGetSubscriptions3() throws Exception {
96
98
97
99
// Do test.
98
100
admin .topics ().getSubscriptions (topicName );
101
+ admin .topics ().createSubscription (topicName , "s1" , MessageId .earliest );
99
102
100
103
// cleanup.
101
104
producer .close ();
0 commit comments