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

[#327] Default local ServiceInstance to a fixed URI i.o. null #330

Merged
merged 5 commits into from
Oct 26, 2023

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Oct 26, 2023

This pull request defaults the ServiceInstance of the AbstractCapabilityDiscoveryMode to a private ServiceInstance with a fixed URI.

Doing so, we prevent a scenario when the CapabilityDiscoveryMode#updateLocalCapabilities is never invoked, leading to a null ServiceInstance.
Preventing this scenario ensures that Axon Framework instances that have zero command handlers will not fail on the "is this the local node I am asking capabilities for"-check, when retrieving the capabilities of other instances.

This pull request resolves #327

Adjust test to not update the local capabilities, as this reflects the
behavior when a node never updates its capabilities since it has not
command handlers

#327
Default the ServiceInstance to a fixed URI version i.o. null. Doing so,

#327
Drop test prefix from tests, as that's the new style

#327
Add descriptive JavaDoc to the NoopUriServiceInstance

#327
Rename the nop service instance to FixedURIServiceInstance

#327
@smcvb smcvb added this to the Release 4.9.1 milestone Oct 26, 2023
@smcvb smcvb requested a review from a team October 26, 2023 12:50
@smcvb smcvb self-assigned this Oct 26, 2023
@smcvb smcvb requested review from gklijs and CodeDrivenMitch and removed request for a team October 26, 2023 12:51
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@smcvb smcvb merged commit de3d3d6 into master Oct 26, 2023
8 of 11 checks passed
@smcvb smcvb deleted the bug/327-instance-without-command-handlers branch October 26, 2023 14:36
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.

Instance without Command Handlers cannot be discovered
2 participants