use of tech.pegasys.teku.infrastructure.async.ThrottlingTaskQueue in project teku by ConsenSys.
the class ExternalValidatorSourceTest method setup.
@BeforeEach
void setup(@TempDir Path tempDir) throws IOException, InterruptedException {
config = ValidatorConfig.builder().validatorExternalSignerUrl(new URL("http://localhost:9000")).build();
externalSignerTaskQueue = new ThrottlingTaskQueue(config.getValidatorExternalSignerConcurrentRequestLimit(), metricsSystem, TekuMetricCategory.VALIDATOR, "external_signer_request_queue_size");
when(httpResponse.statusCode()).thenReturn(SC_OK);
when(httpClient.send(any(), ArgumentMatchers.<HttpResponse.BodyHandler<Void>>any())).thenReturn(httpResponse);
validatorSource = newExternalValidatorSource(tempDir, true);
}
Aggregations