Check timeout after preparing each model
@@ -111,6 +111,8 @@ public class PreparedModelsBuilder extends ModelsBuilder<PreparedModelsBuilder.P
ModelCreateResult result = modelFactory.createAndValidateModel(modelContext, validationParameters);
validateModelHosts(hostValidator, applicationId, result.getModel());
log.log(Level.FINE, "Done building model " + modelVersion + " for " + applicationId);
+ params.getTimeoutBudget().assertNotTimedOut(() -> "prepare timed out after building model " + modelVersion +
+ " (timeout " + params.getTimeoutBudget().timeout() + "): " + applicationId);
return new PreparedModelsBuilder.PreparedModelResult(modelVersion, result.getModel(), fileDistributionProvider, result.getConfigChangeActions());
}
