dsmiley commented on code in PR #4266:
URL: https://github.com/apache/solr/pull/4266#discussion_r3041420258
##########
solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java:
##########
@@ -238,49 +228,53 @@ public void testProperties() throws Exception {
public void testModifyPropertiesV2() throws Exception {
final String aliasName = getSaferTestName();
ZkStateReader zkStateReader = createColectionsAndAlias(aliasName);
- final String baseUrl =
cluster.getRandomJetty(random()).getBaseURLV2().toString();
+ final JettySolrRunner runner = cluster.getRandomJetty(random());
+ final String baseUrl = runner.getBaseURLV2().toString();
+ final HttpClient httpClient = runner.getSolrClient().getHttpClient();
String aliasApi = String.format(Locale.ENGLISH, "/aliases/%s/properties",
aliasName);
- HttpPut withoutBody = new HttpPut(baseUrl + aliasApi);
- assertEquals(400,
httpClient.execute(withoutBody).getStatusLine().getStatusCode());
-
- HttpPut update = new HttpPut(baseUrl + aliasApi);
- update.setEntity(
- new StringEntity(
- "{\n"
- + " \"properties\":\n"
- + " {\n"
- + " \"foo\": \"baz\",\n"
- + " \"bar\": \"bam\"\n"
- + " }\n"
- + "}",
- ContentType.APPLICATION_JSON));
- assertSuccess(update);
+ assertEquals(
+ 400, httpClient.newRequest(baseUrl +
aliasApi).method(HttpMethod.PUT).send().getStatus());
+
+ String body =
+ "{\n"
Review Comment:
I may change some of these where I add new code but otherwise don't want to
change more lines in a massive PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]