@Test public void returnsWithInformationWhenErrorDuringReload() { mockRegistryReload(failedFuture(new RuntimeException(new RuntimeException("simulated error")))); HttpResponse response = Mono.from(handler.handle(get("/").build(), mock(HttpInterceptor.Context.class))).block(); assertThat(response.status(), is(INTERNAL_SERVER_ERROR)); assertThat(response.bodyAs(UTF_8), is(matchesRegex("There was an error processing your request. It has been logged \\(ID [0-9a-f-]+\\)\\.\n"))); }
@Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } OriginsReloadCommandHandler(Registry<BackendService> backendServicesRegistry); }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } OriginsReloadCommandHandler(Registry<BackendService> backendServicesRegistry); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context); }
OriginsReloadCommandHandler implements WebServiceHandler { @Override public Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context) { return new Eventual<>(Flux.create(this::reload) .subscribeOn(Schedulers.fromExecutor(executor))); } OriginsReloadCommandHandler(Registry<BackendService> backendServicesRegistry); @Override Eventual<HttpResponse> handle(HttpRequest request, HttpInterceptor.Context context);  }