|
31 | 31 | /** |
32 | 32 | * @author Tomaz Fernandes |
33 | 33 | * @author Adrian Chlebosz |
| 34 | + * @author Hyunggeol Lee |
34 | 35 | * @since 2.7 |
35 | 36 | */ |
36 | 37 | public class DestinationTopicTests { |
@@ -144,6 +145,33 @@ public class DestinationTopicTests { |
144 | 145 | new DestinationTopic.Properties(0, dltSuffix, DestinationTopic.Type.DLT, 4, 1, |
145 | 146 | DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, (a, e) -> false, timeout, null, Collections.emptySet()); |
146 | 147 |
|
| 148 | + protected DestinationTopic.Properties mainTopicProps6 = |
| 149 | + new DestinationTopic.Properties(0, "", DestinationTopic.Type.MAIN, 4, 1, |
| 150 | + DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, getShouldRetryOn(), timeout); |
| 151 | + |
| 152 | + protected DestinationTopic.Properties reusableRetryTopicProps6 = |
| 153 | + new DestinationTopic.Properties(1000, retrySuffix, DestinationTopic.Type.REUSABLE_RETRY_TOPIC, 4, 1, |
| 154 | + DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, getShouldRetryOn(), timeout); |
| 155 | + |
| 156 | + protected DestinationTopic.Properties customDltTopicProps6 = |
| 157 | + new DestinationTopic.Properties(0, "-custom" + dltSuffix, DestinationTopic.Type.DLT, 4, 1, |
| 158 | + DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, (a, e) -> false, timeout, null, |
| 159 | + Set.of(IllegalStateException.class)); |
| 160 | + |
| 161 | + protected DestinationTopic.Properties validationDltTopicProps6 = |
| 162 | + new DestinationTopic.Properties(0, "-validation" + dltSuffix, DestinationTopic.Type.DLT, 4, 1, |
| 163 | + DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, (a, e) -> false, timeout, null, |
| 164 | + Set.of(IllegalArgumentException.class)); |
| 165 | + |
| 166 | + protected DestinationTopic.Properties dltTopicProps6 = |
| 167 | + new DestinationTopic.Properties(0, dltSuffix, DestinationTopic.Type.DLT, 4, 1, |
| 168 | + DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, (a, e) -> false, timeout, null, |
| 169 | + Collections.emptySet()); |
| 170 | + |
| 171 | + protected DestinationTopic.Properties invalidRetryProps6 = |
| 172 | + new DestinationTopic.Properties(2000, retrySuffix + "-2000", DestinationTopic.Type.RETRY, 4, 1, |
| 173 | + DltStrategy.ALWAYS_RETRY_ON_ERROR, kafkaOperations2, getShouldRetryOn(), timeout); |
| 174 | + |
147 | 175 | // Holders |
148 | 176 |
|
149 | 177 | protected final static String FIRST_TOPIC = "firstTopic"; |
@@ -285,6 +313,38 @@ public class DestinationTopicTests { |
285 | 313 | protected List<DestinationTopic> allFifthDestinationTopics = Arrays |
286 | 314 | .asList(mainDestinationTopic5, reusableRetryDestinationTopic5, dltDestinationTopic5); |
287 | 315 |
|
| 316 | + protected final static String SIXTH_TOPIC = "sixthTopic"; |
| 317 | + |
| 318 | + protected DestinationTopic mainDestinationTopic6 = |
| 319 | + new DestinationTopic(SIXTH_TOPIC + mainTopicProps6.suffix(), mainTopicProps6); |
| 320 | + |
| 321 | + protected DestinationTopic reusableRetryDestinationTopic6 = |
| 322 | + new DestinationTopic(SIXTH_TOPIC + reusableRetryTopicProps6.suffix(), reusableRetryTopicProps6); |
| 323 | + |
| 324 | + protected DestinationTopic customDltDestinationTopic6 = |
| 325 | + new DestinationTopic(SIXTH_TOPIC + customDltTopicProps6.suffix(), customDltTopicProps6); |
| 326 | + |
| 327 | + protected DestinationTopic validationDltDestinationTopic6 = |
| 328 | + new DestinationTopic(SIXTH_TOPIC + validationDltTopicProps6.suffix(), validationDltTopicProps6); |
| 329 | + |
| 330 | + protected DestinationTopic dltDestinationTopic6 = |
| 331 | + new DestinationTopic(SIXTH_TOPIC + dltTopicProps6.suffix(), dltTopicProps6); |
| 332 | + |
| 333 | + protected DestinationTopic invalidRetryDestinationTopic6 = |
| 334 | + new DestinationTopic(SIXTH_TOPIC + invalidRetryProps6.suffix(), invalidRetryProps6); |
| 335 | + |
| 336 | + protected DestinationTopic noOpsDestinationTopic6 = |
| 337 | + new DestinationTopic(dltDestinationTopic6.getDestinationName() + "-noOps", |
| 338 | + new DestinationTopic.Properties(dltTopicProps6, "-noOps", DestinationTopic.Type.NO_OPS)); |
| 339 | + |
| 340 | + protected List<DestinationTopic> allSixthDestinationTopics = Arrays.asList( |
| 341 | + mainDestinationTopic6, |
| 342 | + reusableRetryDestinationTopic6, |
| 343 | + customDltDestinationTopic6, |
| 344 | + validationDltDestinationTopic6, |
| 345 | + dltDestinationTopic6 |
| 346 | + ); |
| 347 | + |
288 | 348 | // Exception matchers |
289 | 349 |
|
290 | 350 | private final ExceptionMatcher allowListExceptionMatcher = ExceptionMatcher.forAllowList().add(IllegalArgumentException.class).build(); |
|
0 commit comments