Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Max HTTP Response Size IT #901

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Conversation

toepkerd
Copy link
Contributor

@toepkerd toepkerd commented Apr 2, 2024

Description

IT for #861

Issues Resolved

See above Issue

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

)
Assert.assertNotNull(updateSettingsResponse)
logger.info("update settings response: $updateSettingsResponse")
Thread.sleep(1000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to wait for 1s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

""".trimIndent()
val configId = createConfigWithRequestJsonString(createRequestJsonString)
Assert.assertNotNull(configId)
Thread.sleep(1000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

val statusText = sendResponse.getAsJsonArray("status_list")[0].asJsonObject["delivery_status"].asJsonObject["status_text"].asString

// we set the max HTTP response size to 8 bytes, which means the expected string length of the response is 8 / 2 (bytes per Java char) = 4
Assert.assertEquals(4, statusText.length)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about we set max http response size to 9? how the result will look like?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will do an int division truncation and limit the string to 4 chars

Signed-off-by: Dennis Toepker <[email protected]>
Hailong-am
Hailong-am previously approved these changes Apr 9, 2024
@Hailong-am Hailong-am merged commit a62c920 into opensearch-project:main Apr 16, 2024
10 of 16 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 16, 2024
* Adding integ test for HTTP response max size setting

Signed-off-by: Dennis Toepker <[email protected]>

* misc build fixes

Signed-off-by: Dennis Toepker <[email protected]>

---------

Signed-off-by: Dennis Toepker <[email protected]>
Co-authored-by: Dennis Toepker <[email protected]>
(cherry picked from commit a62c920)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amsiglan pushed a commit that referenced this pull request Apr 30, 2024
* Adding integ test for HTTP response max size setting



* misc build fixes



---------



(cherry picked from commit a62c920)

Signed-off-by: Dennis Toepker <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dennis Toepker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants