private void setQueue(int delay, boolean ignoreDuplicatedResponses, boolean disableQueue) { selenium.type(LOC_INPUT_REQUEST_DELAY, Integer.toString(delay)); check(LOC_CHECKBOX_IGNORE_DUP_RESPONSES, ignoreDuplicatedResponses); check(LOC_CHECKBOX_DISABLE_QUEUE, disableQueue); selenium.click(LOC_BUTTON_APPLY_SETTINGS); selenium.waitForPageToLoad(Long.toString(Wait.DEFAULT_TIMEOUT)); scrollIntoView(LOC_FIELDSET_HEADER, true); }
private static HttpRequestor.Response createRateLimitResponse(long backoffSeconds) { byte[] body = new byte[0]; return new HttpRequestor.Response( 429, new ByteArrayInputStream(body), headers("Retry-After", Long.toString(backoffSeconds))); }