Skip to content

Conversation

@Suvrat1629
Copy link
Contributor

Purpose

Add comprehensive test coverage for the JSEvalProcessor to verify JavaScript function execution on streaming data events. Tests cover arithmetic operations, string manipulation, conditional logic, and complex transformations.

Remarks

PR introduces (a) breaking change(s): no

PR introduces (a) deprecation(s): no

@github-actions github-actions bot added java Pull requests that update Java code pipeline elements Relates to pipeline elements backend Everything that is related to the StreamPipes backend testing Relates to any kind of test (unit test, integration, or E2E test). labels Oct 5, 2025
@tenthe
Copy link
Contributor

tenthe commented Oct 6, 2025

Hi @Suvrat1629,
thanks a lot for adding the tests — really appreciate your contribution!
It looks like some of them are currently failing in our build pipeline. Could you please take a look and see what might be causing the issue?

Also, if you’re interested, it would be great to add a few tests that use functions with a state. This is described in our blog [1].

If you have any questions, feel free to ask — happy to help!

[1] https://streampipes.apache.org/blog/2025/04/09/javascript-processor/#example-3-stateful-logic

@Suvrat1629
Copy link
Contributor Author

Suvrat1629 commented Oct 10, 2025

@tenthe Well I did try to add some more functions to test states please take a look and tell me if this is what was expected.
Thank you.

@tenthe
Copy link
Contributor

tenthe commented Oct 13, 2025

Hi @Suvrat1629,
thanks for updating the PR.

There seems to be a problem with the date time test in the build pipeline.

 Error:    JSEvalProcessorTest.testDateTimeOperations:346 Assertion failed for key: hour. Expected: {is_weekend=false, original_timestamp=1694786200000, year=2023.0, day=15.0, month=9.0, hour=19.0}, Actual: {original_timestamp=1694786200000, month=9.0, hour=13.0, year=2023.0, day=15.0, is_weekend=false} ==> expected: <19.0> but was: <13.0>

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Hello there 👋

We noticed that it's been some time since activity occurred on your pull request 🤔. In order to keep things moving forward, we're marking this PR as stale and giving you 7 days to respond before it's automatically closed ⏰.

Please take a moment to review your pull request and make any necessary updates or changes 👨‍💻. If you need more time or have any questions, please don't hesitate to let us know 💬.

Thank you for your contributions to our project, and we look forward to hearing back from you soon 🙏.

@github-actions github-actions bot added the stale Marks pull requests that are classified as `stale` by our bot. label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Everything that is related to the StreamPipes backend java Pull requests that update Java code pipeline elements Relates to pipeline elements stale Marks pull requests that are classified as `stale` by our bot. testing Relates to any kind of test (unit test, integration, or E2E test).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants