Skip to content

Add support for doing http calls from the plugin /w the jaxrs filter.#37

Merged
chirino merged 1 commit intoroastedroot:mainfrom
chirino:main
Mar 25, 2025
Merged

Add support for doing http calls from the plugin /w the jaxrs filter.#37
chirino merged 1 commit intoroastedroot:mainfrom
chirino:main

Conversation

@chirino
Copy link
Collaborator

@chirino chirino commented Mar 25, 2025

No description provided.

Signed-off-by: Hiram Chirino <hiram@hiramchirino.com>
Copy link
Contributor

@andreaTP andreaTP left a comment

Choose a reason for hiding this comment

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

Cool!

assertNotNull(plugin);

var logger = (MockLogger) plugin.logger();
Thread.sleep(300);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to trigger plugin.close() instead waiting here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We basically have to wait for the tick events to get delivered to the plugin. . They are getting delivered every 100 ms (configured by the plugin). If we want avoid the wait, we would need to implement a new wasm module, avoiding the use of the async tick event to trigger the http call.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks for explaining, (the config is not in the diff).
A Thread.sleep always makes me a little anxious should we use Awaitility or something similar to avoid this becoming flaky over time?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah.. I think I might just implement a better wasm plugin that allows us to test things better.

@chirino chirino merged commit c1e8b7f into roastedroot:main Mar 25, 2025
5 checks passed
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