|
38 | 38 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
39 | 39 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
40 | 40 | import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
| 41 | +import static org.junit.jupiter.api.Assertions.assertNotNull; |
41 | 42 | import static org.junit.jupiter.api.Assertions.assertNull;
|
42 | 43 | import static org.junit.jupiter.api.Assertions.assertThrows;
|
43 | 44 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
@@ -176,6 +177,12 @@ void checkingRetryingGraduallyWorks() {
|
176 | 177 | assertEquals(CheckRetryingGraduallyConfiguration.MAX_INTERVAL, genericRetry.getMaxInterval());
|
177 | 178 | }
|
178 | 179 |
|
| 180 | + @Test |
| 181 | + void controllerConfigurationOnSuperClassShouldWork() { |
| 182 | + var config = new AnnotationControllerConfiguration<>(new ControllerConfigurationOnSuperClass()); |
| 183 | + assertNotNull(config.getName()); |
| 184 | + } |
| 185 | + |
179 | 186 | @ControllerConfiguration(
|
180 | 187 | maxReconciliationInterval = @MaxReconciliationInterval(interval = 50,
|
181 | 188 | timeUnit = TimeUnit.SECONDS))
|
@@ -334,4 +341,16 @@ public UpdateControl<ConfigMap> reconcile(ConfigMap resource, Context<ConfigMap>
|
334 | 341 | return UpdateControl.noUpdate();
|
335 | 342 | }
|
336 | 343 | }
|
| 344 | + |
| 345 | + private static class ControllerConfigurationOnSuperClass extends BaseClass { |
| 346 | + } |
| 347 | + |
| 348 | + @ControllerConfiguration |
| 349 | + private static class BaseClass implements Reconciler<ConfigMap> { |
| 350 | + |
| 351 | + @Override |
| 352 | + public UpdateControl<ConfigMap> reconcile(ConfigMap resource, Context<ConfigMap> context) { |
| 353 | + return null; |
| 354 | + } |
| 355 | + } |
337 | 356 | }
|
0 commit comments