Close executor in test code
@@ -236,9 +236,14 @@ public class DeploymentContext {
/** Flush count pending DNS updates */
public DeploymentContext flushDnsUpdates(int count) {
var dispatcher = new NameServiceDispatcher(tester.controller(), Duration.ofSeconds(count));
+ try {
dispatcher.run();
return this;
}
+ finally {
+ dispatcher.shutdown();
+ }
+ }
/** Add a routing policy for this in given zone, with status set to inactive */
public DeploymentContext addInactiveRoutingPolicy(ZoneId zone) {
