Skip to content

FINERACT-2537: Add unit tests for StreamResponseUtil#5627

Open
devi-pathak2263 wants to merge 1 commit intoapache:developfrom
devi-pathak2263:add-streamresponseutil-tests
Open

FINERACT-2537: Add unit tests for StreamResponseUtil#5627
devi-pathak2263 wants to merge 1 commit intoapache:developfrom
devi-pathak2263:add-streamresponseutil-tests

Conversation

@devi-pathak2263
Copy link

Description

This PR adds unit tests for the StreamResponseUtil utility class in fineract-core.

The following functionality is covered:

  • ok(StreamResponseData) response generation
  • ok(AsyncResponse, StreamResponseData) asynchronous response handling
  • Behavior when dispositionType is empty
  • Behavior when dispositionType is present (attachment/inline)
  • Correct generation of Content-Disposition headers
  • Verification that StreamingOutput correctly writes the provided stream content

These tests improve code coverage and help ensure correct behavior of response streaming utilities used in the project.

JIRA: https://issues.apache.org/jira/browse/FINERACT-2537

Testing

Executed locally:

./gradlew spotlessApply
./gradlew :fineract-core:test

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

@devi-pathak2263 devi-pathak2263 force-pushed the add-streamresponseutil-tests branch 3 times, most recently from c8a58b9 to 327f5e5 Compare March 16, 2026 14:38
@adamsaghy
Copy link
Contributor

@devi-pathak2263 Can you please:

Set the commit email address to match with your github account email address?
Set GPG signature for commit?

Tests cover:
- ok(StreamResponseData) response creation
- ok(AsyncResponse, StreamResponseData) asynchronous response handling
- Content-Disposition header generation
- StreamingOutput functionality
- Async response execution

These tests improve test coverage and help ensure correct behavior of response streaming utilities.
@devi-pathak2263 devi-pathak2263 force-pushed the add-streamresponseutil-tests branch from 327f5e5 to 34d4689 Compare March 17, 2026 11:56
@devi-pathak2263
Copy link
Author

@devi-pathak2263 Can you please:

Set the commit email address to match with your github account email address? Set GPG signature for commit?

I have updated the commit author email to match my GitHub account and amended the commit with a GPG signature. I also updated the test imports to follow project conventions.

Please let me know if anything else needs adjustment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants