Skip to content

Commit

Permalink
This doesn't need to be random
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoop committed Oct 14, 2024
1 parent fede1d4 commit bbc2682
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void testCreateApiKeyApi() throws Exception {
).withParams(Collections.singletonMap("refresh", randomFrom("false", "true", "wait_for"))).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void testLicenseEnforcement() throws Exception {
}
}"""), XContentType.JSON).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testGetApiKey() throws Exception {
final FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).withParams(params).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -159,7 +159,7 @@ public void testGetApiKeyWithProfileUid() throws Exception {
}
final FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).withParams(param).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -224,7 +224,7 @@ public void testGetApiKeyOwnedByCurrentAuthenticatedUser() throws Exception {
final FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).withParams(param).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testInvalidateApiKey() throws Exception {
).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -144,7 +144,7 @@ public void testInvalidateApiKeyOwnedByCurrentAuthenticatedUser() throws Excepti
).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void testQueryParsing() throws Exception {
).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -184,7 +184,7 @@ public void testAggsAndAggregationsTogether() {
XContentType.JSON
).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -230,7 +230,7 @@ public void testParsingSearchParameters() throws Exception {
).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -290,7 +290,7 @@ public void testQueryApiKeyWithProfileUid() throws Exception {
}
FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).withParams(param).build();
SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void testLicenseEnforcement() throws Exception {
XContentType.JSON
).withParams(Map.of("id", randomAlphaOfLength(10))).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class RestGetTokenActionTests extends ESTestCase {
public void testListenerHandlesExceptionProperly() {
FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand All @@ -67,7 +67,7 @@ public void sendResponse(RestResponse restResponse) {
public void testSendResponse() {
FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -114,7 +114,7 @@ public void sendResponse(RestResponse restResponse) {
public void testSendResponseKerberosError() {
FakeRestRequest restRequest = new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY).build();
final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void testQueryParsing() throws Exception {
).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down Expand Up @@ -132,7 +132,7 @@ public void testParsingSearchParameters() throws Exception {
).build();

final SetOnce<RestResponse> responseSetOnce = new SetOnce<>();
final RestChannel restChannel = new AbstractRestChannel(restRequest, randomBoolean()) {
final RestChannel restChannel = new AbstractRestChannel(restRequest, true) {
@Override
public void sendResponse(RestResponse restResponse) {
responseSetOnce.set(restResponse);
Expand Down

0 comments on commit bbc2682

Please sign in to comment.