|
69 | 69 | import org.apache.pulsar.common.partition.PartitionedTopicMetadata; |
70 | 70 | import org.apache.pulsar.common.protocol.Commands; |
71 | 71 | import org.apache.pulsar.common.topics.TopicList; |
72 | | -import org.awaitility.Awaitility; |
73 | 72 | import org.testng.annotations.AfterMethod; |
74 | 73 | import org.testng.annotations.BeforeMethod; |
75 | 74 | import org.testng.annotations.Test; |
@@ -179,37 +178,6 @@ public void maxLookupRedirectsTest3() throws Exception { |
179 | 178 | } |
180 | 179 | } |
181 | 180 |
|
182 | | - @Test |
183 | | - public void testCommandUnChangedInDifferentThread() throws Exception { |
184 | | - BaseCommand successCommand = Commands.newSuccessCommand(10000); |
185 | | - lookup.getBroker(topicName).get(); |
186 | | - assertEquals(successCommand.getType(), Type.SUCCESS); |
187 | | - lookup.getPartitionedTopicMetadata(topicName, true, true).get(); |
188 | | - assertEquals(successCommand.getType(), Type.SUCCESS); |
189 | | - } |
190 | | - |
191 | | - @Test |
192 | | - public void testCommandChangedInSameThread() throws Exception { |
193 | | - AtomicReference<BaseCommand> successCommand = new AtomicReference<>(); |
194 | | - internalExecutor.execute(() -> successCommand.set(Commands.newSuccessCommand(10000))); |
195 | | - Awaitility.await().untilAsserted(() -> { |
196 | | - BaseCommand baseCommand = successCommand.get(); |
197 | | - assertNotNull(baseCommand); |
198 | | - assertEquals(baseCommand.getType(), Type.SUCCESS); |
199 | | - }); |
200 | | - lookup.getBroker(topicName).get(); |
201 | | - assertEquals(successCommand.get().getType(), Type.LOOKUP); |
202 | | - |
203 | | - internalExecutor.execute(() -> successCommand.set(Commands.newSuccessCommand(10000))); |
204 | | - Awaitility.await().untilAsserted(() -> { |
205 | | - BaseCommand baseCommand = successCommand.get(); |
206 | | - assertNotNull(baseCommand); |
207 | | - assertEquals(baseCommand.getType(), Type.SUCCESS); |
208 | | - }); |
209 | | - lookup.getPartitionedTopicMetadata(topicName, true, true).get(); |
210 | | - assertEquals(successCommand.get().getType(), Type.PARTITIONED_METADATA); |
211 | | - } |
212 | | - |
213 | 181 | private static LookupDataResult createLookupDataResult(String brokerUrl, boolean redirect) throws Exception { |
214 | 182 | LookupDataResult lookupResult = new LookupDataResult(-1); |
215 | 183 |
|
|
0 commit comments