Skip to content

fix(asyncapi): construct and store req-reply event messages - #1943

Merged
lbroudoux merged 2 commits into
microcks:1.13.xfrom
adamhicks:adam-messages
Feb 3, 2026
Merged

lbroudoux merged 2 commits into
microcks:1.13.xfrom
adamhicks:adam-messages

Conversation

@adamhicks

Copy link
Copy Markdown
Contributor

Description

  • If there's a reply node, create RequestReplyEvent exchanges instead of unidirectional events
  • Pair up the request/reply messages based on name
  • If there's no pairing, drop the messages (i think this is the right thing to do)
  • Correlate the response with the request when saving to mongo

Related issue(s)

See #1916

@adamhicks

Copy link
Copy Markdown
Contributor Author
➜ mvn test -Dtest=AsyncAPI3ImporterTest -pl webapp                                      
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< io.github.microcks:microcks-app >-------------------
[INFO] Building Microcks App 1.13.3-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- resources:3.2.0:copy-resources (copy-hooks) @ microcks-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- resources:3.2.0:resources (default-resources) @ microcks-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 13 resources
[INFO] Copying 3 resources
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
[INFO] 
[INFO] --- compiler:3.14.1:compile (default-compile) @ microcks-app ---
[INFO] Nothing to compile - all classes are up to date.
[INFO] 
[INFO] --- spotless:2.39.0:check (default) @ microcks-app ---
[INFO] Spotless.Java is keeping 321 files clean - 0 needs changes to be clean, 0 were already clean, 321 were skipped because caching determined they were already clean
[INFO] 
[INFO] --- resources:3.2.0:testResources (default-testResources) @ microcks-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 168 resources
[INFO] 
[INFO] --- compiler:3.14.1:testCompile (default-testCompile) @ microcks-app ---
[INFO] Nothing to compile - all classes are up to date.
[INFO] 
[INFO] --- surefire:3.2.5:test (default-test) @ microcks-app ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.github.microcks.util.asyncapi.AsyncAPI3ImporterTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.746 s -- in io.github.microcks.util.asyncapi.AsyncAPI3ImporterTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.988 s
[INFO] Finished at: 2026-02-02T11:25:36Z
[INFO] ------------------------------------------------------------------------

@adamhicks

adamhicks commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor Author

I think the test failure is unrelated (assuming I'm reading the report correctly)

Error:  Errors: 
Error:    AsyncAPITestManagerIT.testKafkaAsyncAPITestSuccess:153 NullPointer Cannot invoke "java.util.List.size()" because the return value of "io.github.microcks.minion.async.client.dto.TestCaseReturnDTO.getTestReturns()" is null

Is this a known flaky test?

@lbroudoux

Copy link
Copy Markdown
Member

I think the test failure is unrelated (assuming I'm reading the report correctly)

Error:  Errors: 
Error:    AsyncAPITestManagerIT.testKafkaAsyncAPITestSuccess:153 NullPointer Cannot invoke "java.util.List.size()" because the return value of "io.github.microcks.minion.async.client.dto.TestCaseReturnDTO.getTestReturns()" is null

Is this a known flaky test?

Yeah, it can happen from time to time....

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @adamhicks. This looks all good and it's the nice granularity of PR to ease review. Keep up the great job!

@lbroudoux lbroudoux added this to the Next milestone Feb 3, 2026
@lbroudoux
lbroudoux merged commit 33bc1a4 into microcks:1.13.x Feb 3, 2026
8 of 9 checks passed
@adamhicks
adamhicks deleted the adam-messages branch February 5, 2026 11:06
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.

2 participants